MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaK_exp2RK

Function luaK_exp2RK

3rd/lua-5.4.3/src/lcode.c:1010–1017  ·  view source on GitHub ↗

** Ensures final expression result is in a valid R/K index ** (that is, it is either in a register or in 'k' with an index ** in the range of R/K indices). ** Returns 1 iff expression is K. */

Source from the content-addressed store, hash-verified

1008** Returns 1 iff expression is K.
1009*/
1010int luaK_exp2RK (FuncState *fs, expdesc *e) {
1011 if (luaK_exp2K(fs, e))
1012 return 1;
1013 else { /* not a constant in the right range: put it in a register */
1014 luaK_exp2anyreg(fs, e);
1015 return 0;
1016 }
1017}
1018
1019
1020static void codeABRK (FuncState *fs, OpCode o, int a, int b,

Callers 4

codeABRKFunction · 0.85
codebitwiseFunction · 0.85
codeeqFunction · 0.85
luaK_infixFunction · 0.85

Calls 2

luaK_exp2KFunction · 0.85
luaK_exp2anyregFunction · 0.85

Tested by

no test coverage detected