[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comments on new-model.txt

From: Marius Vollmer
Subject: Re: comments on new-model.txt
Date: 10 Sep 2002 00:55:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Lynn Winebarger <address@hidden> writes:

>       So, we have two SCM types, ilocs and variables (actually
> variable bindings, but we can leave that for later).  ilocs always
> look up their values in the data environment of their closure, and
> variables are just pointers to a storage location.  An extloc would
> be like an iloc (that is, a frame offset and distance in a frame),
> but would be stored in a cell where the second word pointed to the
> data environment to look it up in (the first word would contain the
> frame offset and distance).

What use would be an extloc?  Do you want to export lexical variables?
Or would they be useful for hygienic macro expansion?  Can you give
example code that illustrates their use?

> Likewise an extvarref would contain both the pointer to the binding
> and some way of identifying what top-level environment it's from.

If we need to, we could find the originating module for a imported
variable also from the module that the current code is executed in.
This would be slower, but we would not need the extra pointer in
extvarrefs or variables.

> This would be a convenient way to represent imported variables.  The
> only concrete reason I can offer for including a pointer (of some
> form) to the top level environment of an external variable (actually
> any top-level variable) is for ones that aren't bound at the time of
> parsing (recalling that correct macro expansion can't be lazy in the
> presence of side-effects, as some of the syntax-case examples I've
> been posting should demonstrate).

What would you do with that pointer?

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

[Prev in Thread] Current Thread [Next in Thread]