Opened 15 years ago

Closed 15 years ago

#23 closed defect (fixed)

RETURN handled differently in interpreted and compiled code

Reported by: ehuelsmann Owned by: somebody
Priority: major Milestone:
Component: other Version:
Keywords: Cc:
Parent Tickets:

Description

Robert Dodier writes:

See below for foobar.lisp.

Interpreted:
(foobar)

=>

HELLO 1
NIL

Compiled:
(foobar)

=>

HELLO 1
HELLO 2
T

I'm no expert on the CL spec so I don't know which is correct.
But I think Maxima expects the behavior shown by interpreted code here.

Thanks for your attention to this.

Robert Dodier

PS.
$ cat foobar.lisp
(defun blurf () nil)

(defun foobar ()

(prog (x y z)

(declare (ignore x y z))
((lambda (a b)

(declare (ignore a b))
(format t "HELLO 1~%")
(cond ((not (blurf)) (return nil))))

nil nil)

(format t "HELLO 2~%")
(return t)))

Change History (1)

comment:1 Changed 15 years ago by vvoutilainen

Resolution: fixed
Status: newclosed

Fixed by commit r11396. Thanks to Erik for finding the problematic portion in jvm.lisp. The culprit was in p1-function, which generated a block around the body of an anonymous lambda.

Note: See TracTickets for help on using tickets.