Changeset 14096


Ignore:
Timestamp:
08/15/12 22:55:27 (9 years ago)
Author:
ehuelsmann
Message:

Don't generate empty static initializers.

Note: Given that this commit shrinks our JAR by more than 3k

and the fact that these methods only contain 1 byte, we
must have had quite a number of them...

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

Legend:

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

    r14093 r14096  
    10851085    (emit 'return))
    10861086  (with-code-to-method (class (abcl-class-file-static-initializer class))
    1087     (emit 'return))
     1087    (if (= 0 (length *code*))
     1088        (class-remove-method class (abcl-class-file-static-initializer class))
     1089        (emit 'return)))
    10881090  (when *compiler-debug*
    10891091    (print "; Writing class file ")
  • trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

    r14073 r14096  
    764764             (class-file-methods class))))
    765765
     766(defun class-remove-method (class method)
     767  (setf (class-file-methods class)
     768        (remove method (class-file-methods class)))
     769  method)
     770
    766771(defun class-add-attribute (class attribute)
    767772  "Adds `attribute' to the class; attributes must be instances of
Note: See TracChangeset for help on using the changeset viewer.