|
On 2012-03-05 21:02, Luiz Henrique de Figueiredo wrote:
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 registeror a constant and in the latter case the constant number is shown asnegative in the instruction listing. If constants started at 0 then we'dget -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 fora long time...
Thank you. It's not a problem for me, I was just wondering if there was a more fundamental reason.