This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: kawa 1.6.98 problem
Hi Per,
do you remember our short discussion on the issue below?
The difference between your findings and mine was that I always use
`--full-tailcalls'.
I'm also able to provide a much smaller example:
(define (f x)
(let ( (y 0) )
(let loop ()
(let () (if #f (loop)))
;; uncomment below, then problem disappears.
;; '()
)
(set-cdr! x y)))
With `--full-tailcalls' this leads to a "java.lang.Error: attempting
to push dead variable". Inserting the spurious empty list, as indicated,
removes the problem.
Cheers, Mirko.
Per Bothner writes:
> Dr. M. Luedde wrote:
> > Hello!
> >
> > The following code yields a "java.lang.Error: attempting to push dead
> > variable" on kawa version 1.6.98 (precompiled jar), java version
> > "1.3.1_02".
> >
> > Any ideas?
> >
> > Thanks, Mirko.
> >
> > (define (halves! X)
> > (define (f y z)
> > (if (null? z) y
> > (if (null? (cdr z)) (cdr y)
> > (f (cdr y) (cdr (cdr z))))))
> > (if (null? X) (cons () ())
> > (if (null? (cdr X)) (cons X ())
> > (let ((y ())
> > (z ()))
> > (set! y (f X (cdr (cdr X))))
> > (set! z (cdr y))
> > (set-cdr! y ())
> > (cons X z)))))
> >
>
> It works for me. Tried all of the 1.6.98 compiled
> from scratch, the CVS version of kawa, and the 1.6.98 jar.
> I tried both -f foo.scm and -C foo.scm.
> --
> --Per Bothner
> per@bothner.com http://www.bothner.com/per/