Changeset 12887
- Timestamp:
- 08/11/10 22:11:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r12885 r12887 832 832 (let* ((*compiler-debug* nil) 833 833 ;; We don't normally need to see debugging output for constructors. 834 (constructor (make-method :name "<init>" 835 :descriptor "()V")) 834 (method (!make-method :constructor :void nil 835 :flags '(:public))) 836 (code (method-add-code method)) 836 837 req-params-register 837 838 opt-params-register … … 841 842 more-keys-p 842 843 (*code* ()) 843 (* handlers* nil))844 (setf ( method-max-locals constructor) 1)844 (*current-code-attribute* code)) 845 (setf (code-max-locals code) 3) 845 846 (unless (eq super +lisp-primitive+) 846 847 (multiple-value-bind … … 857 858 (emit-push-constant-int (length ,params)) 858 859 (emit-anewarray +lisp-closure-parameter+) 859 (astore (setf ,register ( method-max-locals constructor)))860 (incf ( method-max-locals constructor))860 (astore (setf ,register (code-max-locals code))) 861 (incf (code-max-locals code)) 861 862 (do* ((,count-sym 0 (1+ ,count-sym)) 862 863 (,params ,params (cdr ,params)) … … 938 939 (setf *code* (append *static-code* *code*)) 939 940 (emit 'return) 940 (setf *code* 941 (finalize-code *code* (nconc (mapcar #'handler-from *handlers*) 942 (mapcar #'handler-to *handlers*) 943 (mapcar #'handler-code *handlers*)) nil)) 944 945 (setf (method-max-stack constructor) 946 (analyze-stack *code* (mapcar #'handler-code *handlers*))) 947 (setf (method-code constructor) (code-bytes *code*)) 948 (setf (method-handlers constructor) (nreverse *handlers*)) 949 constructor)) 941 (setf (code-code code) *code*) 942 method)) 950 943 951 944 (defun write-exception-table (method stream) … … 6931 6924 (dolist (field (class-file-fields class-file)) 6932 6925 (finalize-field field class-file)) 6926 (finalize-method constructor class-file) 6933 6927 6934 6928 (write-u4 #xCAFEBABE stream) … … 6952 6946 (dolist (method (abcl-class-file-methods class-file)) 6953 6947 (write-method method stream)) 6954 ( write-method constructor stream)6948 (!write-method constructor stream) 6955 6949 ;; attributes count 6956 6950 (cond (*file-compilation*
Note: See TracChangeset
for help on using the changeset viewer.