Changeset 11817
- Timestamp:
- 05/03/09 06:10:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11816 r11817 3992 3992 (setf (block-environment-register block) (allocate-register)) 3993 3993 (emit-push-current-thread) 3994 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 3994 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" 3995 +lisp-special-binding+) 3995 3996 (astore (block-environment-register block)) 3996 3997 (label label-START)) … … 4017 4018 (aload values-register) 4018 4019 (emit 'ifnull LABEL1) 4019 ;; Reaching here, we have multiple values (or no values at all). We need4020 ;; the slow path if we have more variables than values.4020 ;; Reaching here, we have multiple values (or no values at all). 4021 ;; We need the slow path if we have more variables than values. 4021 4022 (aload values-register) 4022 4023 (emit 'arraylength) 4023 4024 (emit-push-constant-int (length vars)) 4024 4025 (emit 'if_icmplt LABEL1) 4025 ;; Reaching here, we have enough values for all the variables. We can use4026 ;; the values we have. This is the fast path.4026 ;; Reaching here, we have enough values for all the variables. 4027 ;; We can use the values we have. This is the fast path. 4027 4028 (aload values-register) 4028 4029 (emit 'goto LABEL2) … … 4063 4064 (aload *thread*) 4064 4065 (aload (block-environment-register block)) 4065 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 4066 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" 4067 +lisp-special-binding+) 4066 4068 (push (make-handler :from label-START 4067 4069 :to label-END … … 4093 4095 ;; We can eliminate the variable. 4094 4096 ;; FIXME This may no longer be true when we start tracking writes! 4095 (aver (= (variable-reads variable) (length (variable-references variable)))) 4097 (aver (= (variable-reads variable) 4098 (length (variable-references variable)))) 4096 4099 (dolist (ref (variable-references variable)) 4097 4100 (aver (eq (var-ref-variable ref) variable)) 4098 4101 (setf (var-ref-variable ref) source-var)) 4099 4102 ;; Check for DOTIMES limit variable. 4100 (when (get (variable-name variable) 'sys::dotimes-limit-variable-p) 4101 (let* ((symbol (get (variable-name variable) 'sys::dotimes-index-variable-name)) 4103 (when (get (variable-name variable) 4104 'sys::dotimes-limit-variable-p) 4105 (let* ((symbol (get (variable-name variable) 4106 'sys::dotimes-index-variable-name)) 4102 4107 (index-variable (find-variable symbol (block-vars block)))) 4103 4108 (when index-variable 4104 (setf (get (variable-name index-variable) 'sys::dotimes-limit-variable-name) 4109 (setf (get (variable-name index-variable) 4110 'sys::dotimes-limit-variable-name) 4105 4111 (variable-name source-var))))) 4106 4112 (push variable removed))))))) … … 4272 4278 (allocate-variable-register variable)) 4273 4279 (cond ((variable-special-p variable) 4274 (emit-move-from-stack (setf (variable-temp-register variable) (allocate-register)))) 4280 (emit-move-from-stack 4281 (setf (variable-temp-register variable) 4282 (allocate-register)))) 4275 4283 ((variable-representation variable) 4276 4284 (emit-move-to-variable variable)) … … 4387 4395 (setf (block-environment-register block) (allocate-register)) 4388 4396 (emit-push-current-thread) 4389 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 4397 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" 4398 +lisp-special-binding+) 4390 4399 (astore (block-environment-register block)) 4391 4400 (label label-START)) … … 4545 4554 (aload *thread*) 4546 4555 (aload register) 4547 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+)) 4556 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" 4557 +lisp-special-binding+)) 4548 4558 (maybe-generate-interrupt-check) 4549 4559 (emit 'goto (tag-label tag)) … … 4822 4832 (emit-clear-values)) 4823 4833 (emit-push-current-thread) 4824 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 4834 (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" 4835 +lisp-special-binding+) 4825 4836 (astore environment-register) 4826 4837 (label label-START) … … 4835 4846 (aload *thread*) 4836 4847 (aload environment-register) 4837 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 4848 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" 4849 +lisp-special-binding+) 4838 4850 (emit 'athrow) 4839 4851 … … 4842 4854 (aload *thread*) 4843 4855 (aload environment-register) 4844 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+) 4856 (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" 4857 +lisp-special-binding+) 4845 4858 (fix-boxing representation nil) 4846 4859 (push (make-handler :from label-START
Note: See TracChangeset
for help on using the changeset viewer.