lua-users home
lua-l archive

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


On Apr 30, 2013, at 12:27 AM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:

>> But... now I'm a bit confused by what you consider a, err,  'global'? 
> 
> Yes, I think Lua 5.2 now blurs the distinction between free variables
> and fields in _ENV. Once it applies the transformation x -> _ENV.x,
> there is no way by looking at the generated code to know that x was
> once free.
> 
> Thus, being practical, "global" must mean a field of _ENV, not a free name.

Hmmm… yes… perhaps practical in the sense of feasible, but not practical in the sense of useful.

When referring to 'global' one colloquially understands 'global in the global environment' … global global so to say… not, err, local global in a, hmmm, local environment… which is as interesting as having keys in any old table… in other words, not very much.

Is there a way, in 5.2, to identify these 'global global' through byte code analyses? In the same way one could clearly and easily identify global access by checking for ([GS])ETGLOBAL in 5.1?

I suspect not… oh, well… so much for global checker I guess...