lua-users home
lua-l archive

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


I'm just starting to dig into lua sources so I might be writing
something stupid. However, in lparser.c / recfields( ), the key value
of the record seems to be converted twice into a RK register:

luaK_exp2RK(fs, &key);
expr(ls, &val);
luaK_codeABC(fs, OP_SETTABLE, cc->t->, luaK_exp2RK(fs,
&key), luaK_exp2RK(fs, &val));

I guess that luaK_exp2RK( ) is idempotent, and therefore it doesn't
cause a bug, but it seems useless, and maybe an RC release would be a
nice place to fix it?

(and if the double call to luaK_exp2RK( ) has a purpose, I'd
appreciate if someone could explain me which one!)