Changeset 13536


Ignore:
Timestamp:
08/23/11 21:34:33 (10 years ago)
Author:
ehuelsmann
Message:

Move more static field initialization to the static class initializer
<clinit>() code.

Additionally, place some remarks where I expect issues once I start
compiling forward references the same way as backward references.

File:
1 edited

Legend:

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

    r13535 r13536  
    13931393        (field-name (local-function-field local-function)))
    13941394    (with-code-to-method
    1395         (*class-file* (abcl-class-file-constructor *class-file*))
     1395        (*class-file* (abcl-class-file-static-initializer *class-file*))
    13961396      ;; fixme *declare-inline*
    13971397      (declare-field field-name +lisp-object+)
     
    14171417        (*class-file*
    14181418         (if *declare-inline* *method*
    1419              (abcl-class-file-constructor *class-file*)))
     1419             (abcl-class-file-static-initializer *class-file*)))
    14201420      ;; strings may contain evaluated bits which may depend on
    14211421      ;; previous statements
     
    14331433         (*class-file*
    14341434          (if *declare-inline* *method*
    1435               (abcl-class-file-constructor *class-file*)))
     1435              (abcl-class-file-static-initializer *class-file*)))
    14361436       ;; The readObjectFromString call may require evaluation of
    14371437       ;; lisp code in the string (think #.() syntax), of which the outcome
     
    14561456    (remember g obj)
    14571457    (with-code-to-method
    1458         (*class-file* (abcl-class-file-constructor *class-file*))
     1458        (*class-file* (abcl-class-file-static-initializer *class-file*))
    14591459      (declare-field g +lisp-object+)
    14601460      (emit 'ldc (pool-string g))
     
    41504150          (emit-move-from-stack target))
    41514151         ((inline-ok name)
     4152          ;; ### FASLATONCE: when compiling fasl functions after the
     4153          ;; full fasl has been processed, forward referenced functions
     4154          ;; may not be available during the load process
     4155          ;; This case is particularly triggered with circular referencing
     4156          ;; functions, both marked as 'notinline'
    41524157          (emit-getstatic *this-class*
    41534158                (declare-function name) +lisp-object+)
     
    41674172         ((and (member name *functions-defined-in-current-file* :test #'equal)
    41684173               (not (notinline-p name)))
     4174          ;; ### FASLATONCE: when compiling fasl functions after the
     4175          ;; full fasl has been processed, forward referenced functions
     4176          ;; may not be available during the load process
     4177          ;; This case is particularly triggered with circular referencing
     4178          ;; functions, both marked as 'notinline'
    41694179          (emit-getstatic *this-class*
    41704180                (declare-setf-function name) +lisp-object+)
Note: See TracChangeset for help on using the changeset viewer.