On 11/30/05, Chip Salzenberg <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 30, 2005 at 12:02:08PM -0800, Jonathan Sillito wrote:
> > I have some clarification questions about the new pdd20
>
> > 1. What is expected to be in P0 in:
> >    .lex "$a", P0
>
> The ".lex" directive is compile-time only, and has no runtime effect
> on the contents of P0.  (Of course, once a register is available with
> a lexical name, "store_lex" may modify it.)

OK, so this directive makes "$a" an alias for P0.

> > 2. Should we provide a way for a compiler to provide depths to the
> > find_lex and store_lex ops if it chooses to?
>
> Maximum depths, you mean?  I know of no use case for it.

Not maximum depth but the exact depth for a given lexical variable in
the case of closures. The reason would simply be performance, though
maybe insignificant in the common case (i.e. shallow nesting).

> > 5. Thinking about closure support vs. outer support - the difference
> > and the need for both mechanisms is not clear to me.
>
> Could you unpack this, please?

Well, using :outer allows the look up algorithm to walk through
enclosing lexical scopes ($sub = $sub.outer). In the case of closures
the LexEnv is populated with the enclosing LexPads which I assume come
from enclosing lexical scopes, which allows the the look up to do the
same thing, no? I must be missing something here.

> Chip Salzenberg <[EMAIL PROTECTED]>

Thanks,
Jonathan

Reply via email to