On 10/2/07, Allison Randal <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED] wrote:
> >
> >>> The big overall cunning plan is to remove ".local" for this purpose
> >>> (defining labels), and to use ".local" ONLY for declaring variables.
> >>> Then, once all ".local" (in macros) are replaced by ".label", we can
> >>> start replacing ".sym"s by ".local", so that ".sym" can be removed
> >>> from the lexer.
> >> Shouldn't that be '.macro_local' or something like that ?
> >>
> >> CU, Bernhard
> >
> > you mean for unique identifiers within a macro? I think that's not a
> > bad idea.
> > (But it's just syntax, it's easy to change at a later point; it's not
> > decided yet)
>
> It depends on behavior, really. If the behavior of things declared with
> .local is the same inside and outside macros, then it makes sense to
> keep them both named the same thing. If they have fundamentally
> different behavior, then a distinct name like .macro_local makes sense.
>
> I like the .label/.local scheme, it's simple and clear.



I wonder in what case it's useful to have a "normal" .local directive in a
macro (with its normal semantics).
Every time the macro is expanded, the same local var. would be declared,
which can't be good.

So, it'd make sense to have '.local' generate a unique var within a macro,
but it does break consistency a bit (because the same directive does
different things, but arguably it does the *right* thing in different
contexts).

We can have a look at this after next release, when this clean-up is
finished (removing .sym completely, and all .local's are replaced by
.label's). Then we can decide what stuff is needed for local vars, and
implement one of the options:
i. uniquely generated vars
ii. "normal" local vars
iii. both i and ii.

kjs

Reply via email to