lua-users home
lua-l archive

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


On Wed, 16 Feb 2011, Erik Lindroos wrote:
> On Wed, Feb 16, 2011 at 6:51 PM, Tony Finch <dot@dotat.at> wrote:
> >
> > When steve donovan proposed a "const" keyword earlier today, I wondered if
> > LuaJIT was able to spot that a local is only assigned to once so it could
> > automatically treat it as const.
>
> Locals can also be modified with the debug library, constants cannot.

AIUI LuaJIT assumes you won't violate its assumptions like that.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Southwest Forties, Cromarty: Easterly 5 to 7, veering southeasterly 5. Rough
or very rough, becoming moderate or rough. Rain. Good, occasionally poor.