[gambit-list] different set! behavior in interpreted and compiled code

vasil vasil.s.d at gmail.com
Sun Aug 30 08:46:06 EDT 2009


Hi!

Suppose I have a.scm with next code:
;;------------------------------------------
(define l #f)

(let ((t 0))
    (set! l (lambda (q) (pp t) (set! t q))))
;;------------------------------------------

Then I start gsc and do next things:

Gambit v4.5.1

> (load "a.scm")
".../a.scm"
> (l 2)
0
> (l 3)
2
> (compile-file "a.scm")
> (load "a")
".../a.o1"
> (l 2)
0
#&2
> (l 3)
2
#&3

Why in compiled code set! returns boxed value, but
in interpreted code not?

Vasil



More information about the Gambit-list mailing list