[gambit-list] Re --enable-auto-forcing: Scope, how/where implemented, how build (with) it properly?
adam.mlmb at gmail.com
Thu Jun 15 23:04:43 EDT 2017
2017-06-13 5:30 GMT+07:00 Bradley Lucier <lucier at math.purdue.edu>:
> > On Jun 11, 2017, at 5:08 AM, Adam <adam.mlmb at gmail.com> wrote:
> > Possibly the "macro-force-vars", which is used all over the runtime and
> compiler, would have something to do with this, but I don't find its
> definition anywhere.
> In _gambit#.scm:
> (macro-define-syntax macro-force-vars
> (lambda (stx)
> (syntax-case stx ()
> ((_ vars expr)
> (if (let* ((co
> (##make-global-var '##compilation-options)))
> (if (##unbound? co) '() co)))
> (assq 'force comp-opts))
> (syntax-case (datum->syntax
> (map (lambda (x) `(,x (##force ,x)))
> (syntax->list #'vars)))
> (bindings #'(let bindings expr)))
, and used to be a define-macro,
, and all the rest of the code is meticulously padded with its use.
This also sheds a bit of light on why the slot containing the promise is
not replaced with the forced value. Maybe that would be possible in some
situations though.. When |x| is a symbol, it could be |set!| with the
That would cover standard variable slots and not typedef, vector, pair etc.
slots though, I guess I'd need to dig in a bit more to understand how this
one actually works out. If you have any spontaneous ideas, feel free to
Any idea where in the sources fundamental primitives like |+| , |if| , |or|
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list