|
Mark Hamburg wrote:
I was just reading the Lua VM paper. OP_SELF takes a register or a constant as the method name? How does one get the compiler to generate the register version?
See luaK_exp2RK(fs, key) in function luaK_self(), in lcode.c (5.0.2). It is possible for the constant number to not fit in the instruction's C field; that will take lots of methods.
-- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia