Changeset 11706


Ignore:
Timestamp:
03/14/09 21:27:26 (14 years ago)
Author:
ehuelsmann
Message:

Protect lastSpecialBinding from unexpected PROGV body termination.
See ticket #52.

File:
1 edited

Legend:

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

    r11705 r11706  
    49374937         (values-form (caddr form))
    49384938         (*register* *register*)
    4939          (environment-register (allocate-register)))
     4939         (environment-register (allocate-register))
     4940         (label-START (gensym))
     4941         (label-END (gensym))
     4942         (label-EXIT (gensym)))
    49404943    (compile-form symbols-form 'stack nil)
    49414944    (compile-form values-form 'stack nil)
     
    49464949    (emit 'getfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+)
    49474950    (astore environment-register)
     4951    (label label-START)
    49484952    ;; Compile call to Lisp.progvBindVars().
    49494953    (aload *thread*)
     
    49524956    ;; Implicit PROGN.
    49534957    (compile-progn-body (cdddr form) target)
    4954     ;; Restore dynamic environment.
     4958    (label label-END)
    49554959    (aload *thread*)
    49564960    (aload environment-register)
    49574961    (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+)
    4958     (fix-boxing representation nil)))
     4962    (emit 'athrow)
     4963
     4964    ;; Restore dynamic environment.
     4965    (label label-EXIT)
     4966    (aload *thread*)
     4967    (aload environment-register)
     4968    (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+)
     4969    (fix-boxing representation nil)
     4970    (push (make-handler :from label-START
     4971                          :to label-END
     4972                          :code label-END
     4973                          :catch-type 0) *handlers*)))
    49594974
    49604975(defun p2-quote (form target representation)
Note: See TracChangeset for help on using the changeset viewer.