[gambit-list] Force in --enable-auto-forcing not replacing slot with forced value, possible?

Adam adam.mlmb at gmail.com
Sun Jun 11 04:53:17 EDT 2017


Hi Marc,

I notice that in --enable-auto-forcing, doing (begin (define x (delay 1))
(+ a)), a still shows as a promise object in the REPL, and (##promise? a)
evaluates to #t (even while as expected, the force is automatic so (+ a)
evaluates to 1 etc.).

I had an impression that auto forcing was implemented through something
like a read barrier, which would replace the slot containing the promise
object, with the forced value.

This is not so currently. This means a memory access indirection remains at
each access of a promise value, right?

Would it be trivial to implement such replacement as to remove that
indirection?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20170611/e4a60668/attachment.htm>


More information about the Gambit-list mailing list