Changeset 12844 for branches/generic-class-file/abcl/src/org/armedbear
- Timestamp:
- 08/01/10 18:05:04 (13 years ago)
- Location:
- branches/generic-class-file/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r12841 r12844 198 198 (u2 (if (< n 0) (1+ (logxor (- n) #xFFFF)) 199 199 n))) 200 201 202 (defun add-exception-handler (start end handler type) 203 (if (null *current-code-attribute*) 204 (push (make-handler :from start 205 :to end 206 :code handler 207 :catch-type (if (null type) 208 0 209 (pool-class (!class-name type)))) 210 *handlers*) 211 (code-add-exception-handler *current-code-attribute* 212 start end handler type))) 200 213 201 214 … … 3972 3985 (label label-EXIT) 3973 3986 (restore-dynamic-environment register) 3974 (push (make-handler :from label-START 3975 :to label-END 3976 :code label-END 3977 :catch-type 0) *handlers*))) 3987 (add-exception-handler label-START label-END label-END nil))) 3978 3988 3979 3989 (defun p2-m-v-b-node (block target) … … 4507 4517 (emit 'athrow) 4508 4518 ;; Finally... 4509 (push (make-handler :from BEGIN-BLOCK 4510 :to END-BLOCK 4511 :code HANDLER 4512 :catch-type (pool-class (!class-name +lisp-go+))) 4513 *handlers*) 4514 (push (make-handler :from BEGIN-BLOCK 4515 :to END-BLOCK 4516 :code EXTENT-EXIT-HANDLER 4517 :catch-type 0) 4518 *handlers*))) 4519 (add-exception-handler BEGIN-BLOCK END-BLOCK HANDLER +lisp-go+) 4520 (add-exception-handler BEGIN-BLOCK END-BLOCK EXTENT-EXIT-HANDLER nil))) 4519 4521 (label EXIT) 4520 4522 (when (tagbody-non-local-go-p block) … … 4678 4680 (emit-move-from-stack target) ; Stack depth is 0. 4679 4681 ;; Finally... 4680 (push (make-handler :from BEGIN-BLOCK 4681 :to END-BLOCK 4682 :code HANDLER 4683 :catch-type (pool-class (!class-name +lisp-return+))) 4684 *handlers*) 4685 (push (make-handler :from BEGIN-BLOCK 4686 :to END-BLOCK 4687 :code EXTENT-EXIT-HANDLER 4688 :catch-type 0) 4689 *handlers*))) 4682 (add-exception-handler BEGIN-BLOCK END-BLOCK HANDLER +lisp-return+) 4683 (add-exception-handler BEGIN-BLOCK END-BLOCK EXTENT-EXIT-HANDLER nil))) 4690 4684 (label BLOCK-EXIT) 4691 4685 (when (block-id-variable block) … … 7623 7617 (aload object-register) 7624 7618 (emit 'monitorexit) 7625 (push (make-handler :from BEGIN-PROTECTED-RANGE 7626 :to END-PROTECTED-RANGE 7627 :code END-PROTECTED-RANGE 7628 :catch-type 0) *handlers*))) 7619 (add-exception-handler BEGIN-PROTECTED-RANGE 7620 END-PROTECTED-RANGE 7621 END-PROTECTED-RANGE nil))) 7629 7622 7630 7623 … … 7677 7670 (emit-push-current-thread) 7678 7671 (emit-invokevirtual +lisp-thread+ "popCatchTag" nil nil) 7679 (let ((handler1 (make-handler :from BEGIN-PROTECTED-RANGE 7680 :to END-PROTECTED-RANGE 7681 :code THROW-HANDLER 7682 :catch-type (pool-class (!class-name +lisp-throw+)))) 7683 (handler2 (make-handler :from BEGIN-PROTECTED-RANGE 7684 :to END-PROTECTED-RANGE 7685 :code DEFAULT-HANDLER 7686 :catch-type 0))) 7687 (push handler1 *handlers*) 7688 (push handler2 *handlers*)))) 7672 (add-exception-handler BEGIN-PROTECTED-RANGE 7673 END-PROTECTED-RANGE 7674 THROW-HANDLER +lisp-throw+) 7675 (add-exception-handler BEGIN-PROTECTED-RANGE 7676 END-PROTECTED-RANGE 7677 DEFAULT-HANDLER nil))) 7689 7678 t) 7690 7679 … … 7772 7761 (aload result-register) 7773 7762 (emit-move-from-stack target) 7774 (let ((handler (make-handler :from BEGIN-PROTECTED-RANGE 7775 :to END-PROTECTED-RANGE 7776 :code HANDLER 7777 :catch-type 0))) 7778 (push handler *handlers*))))) 7763 (add-exception-handler BEGIN-PROTECTED-RANGE 7764 END-PROTECTED-RANGE HANDLER nil)))) 7779 7765 7780 7766 (defknown compile-form (t t t) t) -
branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-class-file.lisp
r12842 r12844 865 865 (code-exception-handlers code))) 866 866 867 (defun add-exception-handler (start end handler type)868 (code-add-exception-handler *current-code-attribute* start end handler type))869 870 867 (defstruct exception 871 868 start-pc ;; label target
Note: See TracChangeset
for help on using the changeset viewer.