lua-users home
lua-l archive

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


> "2^2" have NOT went into OP_TAILCALL, and also OP_POW.
> So strange...

"2^2" is computed at compile time because it's a constant expression.
"return 2^2" gives this bytecode:

VARARGPREP      0
LOADF           0 4
RETURN          0 2 1   ; 1 out
RETURN          0 1 1   ; 0 out

which matches your report except that you had LOADI instead of LOADF.