MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / exp2RK

Function exp2RK

lib/lua/src/lcode.c:1029–1036  ·  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

1027** Returns 1 iff expression is K.
1028*/
1029static int exp2RK (FuncState *fs, expdesc *e) {
1030 if (luaK_exp2K(fs, e))
1031 return 1;
1032 else { /* not a constant in the right range: put it in a register */
1033 luaK_exp2anyreg(fs, e);
1034 return 0;
1035 }
1036}
1037
1038
1039static void codeABRK (FuncState *fs, OpCode o, int a, int b,

Callers 3

codeABRKFunction · 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