[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: numbering in luac -l -l
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 5 Mar 2012 17:02:26 -0300
> I am noticed that, in the debug output of luac,
> constants numbering starts at 1 whereas locals
> and upvalues numbering starts at 0.
No string reason except that some instructions accept either a register
or a constant and in the latter case the constant number is shown as
negative in the instruction listing. If constants started at 0 then we'd
get -0 in the listing and it'd look weird. Perhaps not.
I agree it's not very consistent but there it is. And it's been like that for
a long time...