sasagawa888 / eisl

ISLisp interpreter/compiler
Other
272 stars 22 forks source link

with-handler compiler bug #221

Closed sasagawa888 closed 1 year ago

sasagawa888 commented 1 year ago

Compiler can not compile with-handler. lack

sasagawa888 commented 1 year ago

Improving compiler. It works with following simple test case.

(defun foo (x)
   (catch 'exit
      (with-handler 
          (lambda (c) (throw 'exit c))
                 (bar x))))

(defun bar (x)
    (car x))

Easy-ISLisp Ver2.64
> (load "tests/bug.o")
T
> (foo 1)
<instance>
> (foo '(1 2))
1
> 

But compiled prolog.o invoke segmentation fault.

sasagawa888 commented 1 year ago

Fixed it. Now compiled prolog.o works well.