Ticket #89: abcl-ticket-89.patch

File abcl-ticket-89.patch, 1.2 KB (added by Mark Evenson, 14 years ago)

Fix stack inconsistency in P2-BLOCK-NODE

  • src/org/armedbear/lisp/compiler-pass2.lisp

    diff -r 749ff001f9ff src/org/armedbear/lisp/compiler-pass2.lisp
    a b  
    48694869         (*register* *register*)
    48704870         (BEGIN-BLOCK (gensym))
    48714871         (END-BLOCK (gensym))
    4872          (BLOCK-EXIT (block-exit block)))
     4872         (BLOCK-EXIT (block-exit block))
     4873         (BLOCK-EXIT-THIS-BLOCK (gensym)))
    48734874    (setf (block-target block) target)
    48744875    (when (block-id-variable block)
    48754876      ;; we have a block variable; that should be a closure variable
     
    49054906        (label THIS-BLOCK)
    49064907        (emit 'getfield +lisp-return-class+ "result" +lisp-object+)
    49074908        (emit-move-from-stack target) ; Stack depth is 0.
     4909        (emit 'goto BLOCK-EXIT-THIS-BLOCK)
    49084910        ;; Finally...
    49094911        (push (make-handler :from BEGIN-BLOCK
    49104912                            :to END-BLOCK
     
    49204922    (when (block-id-variable block)
    49214923      (emit 'aconst_null) ;; load null value
    49224924      (emit-move-to-variable (block-id-variable block)))
     4925    (label BLOCK-EXIT-THIS-BLOCK)
    49234926    (fix-boxing representation nil)))
    49244927
    49254928(defknown p2-return-from (t t t) t)