11 Jui
2017
11 Jui
'17
08:53
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!