Changeset 13486 for trunk/abcl/src/org


Ignore:
Timestamp:
08/13/11 10:30:16 (10 years ago)
Author:
ehuelsmann
Message:

Assign all local functions a field in the immediate parent;
also make sure all compiland children have known class names
before processing the body of the compiland.

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

Legend:

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

    r13485 r13486  
    40334033  "Creates a class file associated with `compiland`, writing it
    40344034either to stream or the pathname of the class file if `stream' is NIL."
    4035   (let* ((pathname (funcall *pathnames-generator*))
    4036          (class-file (make-abcl-class-file
    4037                       :pathname pathname)))
    4038     (setf (compiland-class-file compiland) class-file)
     4035  (let* ((class-file (compiland-class-file compiland))
     4036         (pathname (abcl-class-file-pathname class-file)))
    40394037    (with-open-stream (f (or stream
    40404038                             (open pathname :direction :output
     
    40454043          (with-saved-compiler-policy
    40464044              (p2-compiland compiland)
    4047             ;;        (finalize-class-file (compiland-class-file compiland))
    40484045            (finish-class (compiland-class-file compiland) f)))))))
    40494046
     
    41394136(defun p2-lambda (local-function target)
    41404137  (let ((compiland (local-function-compiland local-function)))
    4141     (aver (null (compiland-class-file compiland)))
     4138    (aver (not (null (compiland-class-file compiland))))
    41424139    (cond (*file-compilation*
    41434140           (compile-and-write-to-stream compiland)
     
    70947091  t)
    70957092
     7093
     7094(defun assign-field-and-class-name (local-function)
     7095  (let* ((pathname (funcall *pathnames-generator*))
     7096         (class-file (make-abcl-class-file :pathname pathname))
     7097         (compiland (local-function-compiland local-function)))
     7098    (setf (compiland-class-file compiland) class-file))
     7099  (setf (local-function-field local-function)
     7100        (declare-local-function local-function)))
     7101
    70967102(defknown p2-compiland (t) t)
    70977103(defun p2-compiland (compiland)
     
    71447150          (code-add-attribute *current-code-attribute* table)
    71457151          (line-numbers-add-line table 0 *source-line-number*)))
     7152
     7153      (dolist (local-function (compiland-children compiland))
     7154        (assign-field-and-class-name local-function))
    71467155
    71477156      (dolist (var (compiland-arg-vars compiland))
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r13485 r13486  
    376376  definition
    377377  compiland
     378  field
    378379  inline-expansion
    379380  variable    ;; the variable which contains the loaded compiled function
Note: See TracChangeset for help on using the changeset viewer.