lua-users home
lua-l archive

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

David Given wrote:
Of course, right now the Lua interpreter *doesn't* do this, IIRC ---
each variable gets its own dedicated stack slot --- so we can rely on
them being initialised to nil. But I'm willing to bet that LuaJIT does.

Any compiler doing smart register allocation will realise that they cannot overlay a and b in those circumstances. Won't even need to "special-case" it.

The only problem is there is no clear and obvious way the code should function, so my stance has always been throw a meaningful error. It's not a hard one to catch at all, requiring only a minor modification to the parser..

- Alex