Changeset 13470


Ignore:
Timestamp:
08/12/11 19:43:37 (10 years ago)
Author:
ehuelsmann
Message:

Explicitly record the children of a compiland for later use,
instead of counting them, even though we only needed a HAS-CHILDREN boolean.

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

Legend:

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

    r13468 r13470  
    727727  `(let ((*visible-variables* *visible-variables*)
    728728         (*local-functions* *local-functions*)
    729          (*current-compiland* *current-compiland*)
     729         (parent-compiland *current-compiland*)
    730730         (,local-functions-var '()))
    731      (incf (compiland-children *current-compiland*) (length (cadr ,form)))
    732731     (dolist (definition (cadr ,form))
    733732       (let ((,name-var (car definition))
     
    736735         (let* ((,body-var (cddr definition))
    737736                (compiland (make-compiland :name ,name-var
    738                                            :parent *current-compiland*)))
     737                                           :parent parent-compiland)))
     738           (push compiland (compiland-children parent-compiland))
    739739           ,@body1)))
    740740     (setf ,local-functions-var (nreverse ,local-functions-var))
     
    10221022                                             :lambda-expression lambda-form
    10231023                                             :parent *current-compiland*)))
    1024              (when *current-compiland*
    1025                (incf (compiland-children *current-compiland*)))
     1024             (push compiland (compiland-children *current-compiland*))
    10261025             (multiple-value-bind (body decls)
    10271026                 (parse-body body)
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r13469 r13470  
    70897089               (not (variable-special-p variable))
    70907090               (not (variable-used-non-locally-p variable))
    7091                (zerop (compiland-children *current-compiland*)))
     7091               (null (compiland-children *current-compiland*)))
    70927092      (when (memq (type-representation (variable-declared-type variable))
    70937093                  '(:int :long))
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r13469 r13470  
    200200  p1-result         ; the parse tree as created in pass 1
    201201  parent            ; the parent for compilands which defined within another
    202   (children 0       ; Number of local functions
    203             :type fixnum) ; defined with FLET, LABELS or LAMBDA
     202  children          ; List of local compilands
     203                    ; defined with FLET, LABELS or LAMBDA
    204204  blocks            ; TAGBODY, PROGV, BLOCK, etc. blocks
    205205  argument-register
Note: See TracChangeset for help on using the changeset viewer.