MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / codebinexpval

Function codebinexpval

third-party/lua-5.5.0/src/lcode.c:1506–1515  ·  view source on GitHub ↗

** Emit code for binary expressions that "produce values" over ** two registers. */

Source from the content-addressed store, hash-verified

1504** two registers.
1505*/
1506static void codebinexpval (FuncState *fs, BinOpr opr,
1507 expdesc *e1, expdesc *e2, int line) {
1508 OpCode op = binopr2op(opr, OPR_ADD, OP_ADD);
1509 int v2 = luaK_exp2anyreg(fs, e2); /* make sure 'e2' is in a register */
1510 /* 'e1' must be already in a register or it is a constant */
1511 lua_assert((VNIL <= e1->k && e1->k <= VKSTR) ||
1512 e1->k == VNONRELOC || e1->k == VRELOC);
1513 lua_assert(OP_ADD <= op && op <= OP_SHR);
1514 finishbinexpval(fs, e1, e2, op, v2, 0, line, OP_MMBIN, binopr2TM(opr));
1515}
1516
1517
1518/*

Callers 2

codebinNoKFunction · 0.70
luaK_posfixFunction · 0.70

Calls 4

binopr2opFunction · 0.70
luaK_exp2anyregFunction · 0.70
finishbinexpvalFunction · 0.70
binopr2TMFunction · 0.70

Tested by

no test coverage detected