Fix byte code verification error in edge case

(Olof-Joachim Frahm)

From <>.
parent d0cb69bb
......@@ -6846,8 +6846,6 @@ We need more thought here.
(defun p2-throw (form target representation)
;; FIXME What if we're called with a non-NIL representation?
(declare (ignore representation))
(compile-operand (second form) nil) ; Tag.
......@@ -6857,7 +6855,11 @@ We need more thought here.
(lisp-object-arg-types 2) nil))
;; Following code will not be reached.
(when target
(ecase representation
((:int :boolean :char)
(emit 'iconst_0))
(emit-move-from-stack target)))
(defun p2-unwind-protect-node (block target)
......@@ -135,3 +135,16 @@
(deftest nth.inlined.1
(prog1 T (compile NIL (lambda (list) (nth (lambda ()) list))))
;; these used to fail during byte code verification
(deftest throw.representation.1
(prog1 T (compile NIL (lambda () (eql (the fixnum (throw 'foo 42)) 2))))
(deftest throw.representation.2
(prog1 T (compile NIL (lambda () (char-code (the character (throw 'foo 42))))))
(deftest throw.representation.3
(prog1 T (compile NIL (lambda () (if (the boolean (throw 'foo 42)) 1 2))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment