Changeset 8349 for trunk/j/src/org/armedbear/lisp/jvm.lisp
- Timestamp:
- 01/13/05 11:19:37 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/jvm.lisp
r8348 r8349 2 2 ;;; 3 3 ;;; Copyright (C) 2003-2005 Peter Graves 4 ;;; $Id: jvm.lisp,v 1.34 7 2005-01-13 10:09:20piso Exp $4 ;;; $Id: jvm.lisp,v 1.348 2005-01-13 11:19:37 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 144 144 (dump-1-variable variable)) 145 145 (%format t " None.~%")))) 146 147 (defvar *nesting-level* 0)148 146 149 147 (defstruct variable … … 449 447 `(lambda ,lambda-list ,@decls (block ,name ,@body))) 450 448 (let ((*visible-variables* *visible-variables*) 451 (*nesting-level* (1+ *nesting-level*))452 449 (*current-compiland* compiland)) 453 450 (p1-compiland compiland))) … … 484 481 (dolist (local-function local-functions) 485 482 (let ((*visible-variables* *visible-variables*) 486 (*nesting-level* (1+ *nesting-level*))487 483 (*current-compiland* (local-function-compiland local-function))) 488 484 (p1-compiland (local-function-compiland local-function)))) … … 506 502 `(lambda ,lambda-list ,@decls (block nil ,@body))) 507 503 (let ((*visible-variables* *visible-variables*) 508 (*nesting-level* (1+ *nesting-level*))509 504 (*current-compiland* compiland)) 510 505 (p1-compiland compiland))) … … 3956 3951 (error "P2-LOCAL-FUNCTION: can't handle optional argument with non-constant initform."))))))) 3957 3952 (setf form (compiland-lambda-expression compiland)) 3958 (let ((*nesting-level* (1+ *nesting-level*))) 3959 (setf classfile (if *compile-file-truename* 3960 (sys::next-classfile-name) 3961 (prog1 3962 (%format nil "local-~D.class" *child-count*) 3963 (incf *child-count*)))) 3964 (setf (compiland-classfile compiland) classfile) 3965 (let ((*current-compiland* compiland) 3966 (*speed* *speed*) 3967 (*safety* *safety*) 3968 (*debug* *debug*)) 3969 (p2-compiland compiland)) 3970 (when (null *compile-file-truename*) 3971 (setf function (sys:load-compiled-function classfile)))) 3953 (setf classfile (if *compile-file-truename* 3954 (sys::next-classfile-name) 3955 (prog1 3956 (%format nil "local-~D.class" *child-count*) 3957 (incf *child-count*)))) 3958 (setf (compiland-classfile compiland) classfile) 3959 (let ((*current-compiland* compiland) 3960 (*speed* *speed*) 3961 (*safety* *safety*) 3962 (*debug* *debug*)) 3963 (p2-compiland compiland)) 3964 (when (null *compile-file-truename*) 3965 (setf function (sys:load-compiled-function classfile))) 3972 3966 (cond (local-function 3973 3967 (setf (local-function-classfile local-function) classfile) … … 4113 4107 (cond 4114 4108 ((setf local-function (find-local-function name)) 4109 (when (eq (local-function-compiland local-function) *current-compiland*) 4110 (emit 'aload 0) ; this 4111 (emit-move-from-stack target) 4112 (return-from p2-function)) 4115 4113 (if (local-function-variable local-function) 4116 4114 (emit 'var-ref (local-function-variable local-function) :stack) … … 4122 4120 g 4123 4121 +lisp-object+))) ; Stack: template-function 4124 ;; (unless (zerop *nesting-level*)4125 ;; (error "nesting level > 0, not supported"))4126 4122 (cond 4127 4123 ((null *closure-variables*)) ; Nothing to do. … … 5270 5266 (dformat t "pass2 *using-arg-array* = ~S~%" *using-arg-array*) 5271 5267 (dformat t "pass2 *child-p* = ~S~%" *child-p*) 5272 (dformat t "pass2 *nesting-level* = ~S~%" *nesting-level*)5273 ;; (when (zerop *nesting-level*)5274 ;; (setf *child-count* 0))5275 ;; (setf *context* (make-context))5276 5268 (setf (method-name-index execute-method) 5277 5269 (pool-name (method-name execute-method)))
Note: See TracChangeset
for help on using the changeset viewer.