Changeset 13535


Ignore:
Timestamp:
08/23/11 20:35:32 (9 years ago)
Author:
ehuelsmann
Message:

Moving huge object serialization from <init>() to <clinit>()
broke the code generation for that special case -- there's no longer
a 'this' variable to be loaded. Replace with <this class>.class.

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

Legend:

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

    r13529 r13535  
    10581058  (let ((*compiler-debug* nil)
    10591059        (method (make-jvm-method :static-initializer
    1060         :void nil :flags '(:public :static))))
     1060                                :void nil :flags '(:public :static))))
    10611061    ;; We don't normally need to see debugging output for <clinit>.
    10621062    (with-code-to-method (class method)
     
    12061206                          (list +java-string+) +lisp-object+))
    12071207      (t
    1208        (aload 0) ;; this
    1209        (emit-invokevirtual +java-object+ "getClass" '() +java-class+)
     1208        ;; get a 'class literal' for this class
     1209       (emit 'ldc_w (pool-class *this-class*))
    12101210       (let ((pathname
    12111211              (compiland-external-constant-resource-name *current-compiland*)))
  • trunk/abcl/src/org/armedbear/lisp/compiler-types.lisp

    r11591 r13535  
    227227
    228228(declaim (type hash-table *function-result-types*))
    229 (defconst *function-result-types* (make-hash-table :test 'equal))
     229(defvar *function-result-types* (make-hash-table :test 'equal))
    230230
    231231(declaim (ftype (function (t) t) function-result-type))
  • trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

    r13511 r13535  
    699699  ;; header
    700700  (write-u4 #xCAFEBABE stream)
    701   (write-u2 3 stream)
    702   (write-u2 45 stream)
     701  (write-u2 0 stream)
     702  (write-u2 49 stream)  ;; our <clinit> methods use class literals
     703  ;; which require a high enough class file format
     704  ;; we used to have 45, but the LDC instruction doesn't support
     705  ;; class literals in that version... (49 == Java 1.5)
    703706
    704707   ;; constants pool
     
    715718  ;; interfaces
    716719  (if (class-file-interfaces class)
    717       (progn 
     720      (progn
    718721        (write-u2 (length (class-file-interfaces class)) stream)
    719722        (dolist (interface-ref (class-file-interfaces class))
  • trunk/abcl/src/org/armedbear/lisp/jvm-instructions.lisp

    r13222 r13535  
    661661        (inst 18 args))))
    662662
     663;; ldc_w
     664(define-resolver 19 (instruction)
     665  (let* ((args (instruction-args instruction)))
     666    (unless (= (length args) 1)
     667      (error "Wrong number of args for LDC_W."))
     668    (inst 19 (u2 (car args)))))
     669
    663670;; ldc2_w
    664671(define-resolver 20 (instruction)
Note: See TracChangeset for help on using the changeset viewer.