Changeset 12883


Ignore:
Timestamp:
08/09/10 12:50:32 (12 years ago)
Author:
ehuelsmann
Message:

Switch fields to the new generator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12882 r12883  
    11471147(defknown declare-field (t t t) t)
    11481148(defun declare-field (name descriptor)
    1149   (if nil ;; *current-code-attribute*
    1150       (let ((field (!make-field name descriptor
    1151                                 :flags '(:final :static :private))))
    1152         (class-add-field *class-file* field))
    1153       (let ((field (make-field name (internal-field-ref descriptor))))
    1154         ;; final static <access-flags>
    1155         (setf (field-access-flags field)
    1156               (logior +field-flag-final+ +field-flag-static+
    1157                       +field-access-private+))
    1158         (setf (field-name-index field) (pool-name (field-name field)))
    1159         (setf (field-descriptor-index field)
    1160               (pool-name (field-descriptor field)))
    1161         (push field *fields*))))
     1149  (let ((field (!make-field name descriptor
     1150                            :flags '(:final :static :private))))
     1151    (class-add-field *class-file* field)))
    11621152
    11631153(defknown sanitize (symbol) string)
     
    70687058               (fixnump *source-line-number*))
    70697059      (pool-name "LineNumberTable")) ; Must be in pool!
    7070    
     7060    (dolist (field (class-file-fields class-file))
     7061      (finalize-field field class-file))
     7062
    70717063    (write-u4 #xCAFEBABE stream)
    70727064    (write-u2 3 stream)
     
    70807072    (write-u2 0 stream)
    70817073    ;; fields count
    7082     (write-u2 (length *fields*) stream)
     7074    (write-u2 (length (class-file-fields class-file)) stream)
    70837075    ;; fields
    7084     (dolist (field *fields*)
    7085       (write-field field stream))
     7076    (dolist (field (class-file-fields class-file))
     7077      (!write-field field stream))
    70867078    ;; methods count
    70877079    (write-u2 (1+ (length (abcl-class-file-methods class-file))) stream)
Note: See TracChangeset for help on using the changeset viewer.