Changeset 12401


Ignore:
Timestamp:
01/25/10 22:42:38 (12 years ago)
Author:
astalla
Message:

Added a flag to local functions that tracks whether they need an actual
function object to be created (i.e. they are capture with FUNCTION).

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r12398 r12401  
    841841          ((setf local-function (find-local-function (cadr form)))
    842842           (dformat t "p1-function local function ~S~%" (cadr form))
     843     ;;we found out that the function needs a reference
     844     (setf (local-function-references-needed-p local-function) t)
    843845           (let ((variable (local-function-variable local-function)))
    844846             (when variable
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r12229 r12401  
    365365              ;; case of a function from an enclosing lexical environment
    366366              ;; which itself isn't being compiled
    367   (references-allowed-p t)
     367  (references-allowed-p t) ;;whether a reference to the function CAN be captured
     368  (references-needed-p nil) ;;whether a reference to the function NEEDS to be
     369          ;;captured, because the function name is used in a
     370                            ;;(function ...) form. Obviously implies
     371                            ;;references-allowed-p.
    368372  )
    369373
     
    465469
    466470(defstruct (flet-node (:conc-name flet-)
    467                       (:include binding-node)))
    468 (defknown make-let/let*-node () t)
    469 (defun make-let/let*-node ()
    470   (let ((block (%make-let/let*-node)))
     471                      (:include binding-node)
     472          (:constructor %make-flet-node ())))
     473(defknown make-flet-node () t)
     474(defun make-flet-node ()
     475  (let ((block (%make-flet-node)))
    471476    (push block (compiland-blocks *current-compiland*))
    472477    block))
Note: See TracChangeset for help on using the changeset viewer.