sasagawa888 / eisl

ISLisp interpreter/compiler
Other
288 stars 23 forks source link

compile-of unwind-protect #268

Closed sasagawa888 closed 1 year ago

sasagawa888 commented 1 year ago

The behavior of unwind-protect differs between the interpreter and the compiler.

Easy-ISLisp Ver2.94
> (load "tests/bug.o")
T
> (unwind2)
"should be printed second"
"should be printed first"
NIL
> 
gtnoble commented 1 year ago

Thank you for noticing this! I was running some compiled code and couldn't understand why it wasn't working.

sasagawa888 commented 1 year ago

Fixed.

Easy-ISLisp Ver2.95
> (load "tests/bug.o")
T
> (unwind1)
"should be printed first"
"should be printed second"
"should be printed third"
NIL
> (unwind2)
"should be printed first"
"should be printed second"
NIL
>