MCPcopy Create free account
hub / github.com/DFHack/dfhack / codebinexpval

Function codebinexpval

depends/lua/src/lcode.c:1022–1030  ·  view source on GitHub ↗

** Emit code for binary expressions that "produce values" ** (everything but logical operators 'and'/'or' and comparison ** operators). ** Expression to produce final result will be encoded in 'e1'. ** Because 'luaK_exp2RK' can free registers, its calls must be ** in "stack order" (that is, first on 'e2', which may have more ** recent registers to be released). */

Source from the content-addressed store, hash-verified

1020** recent registers to be released).
1021*/
1022static void codebinexpval (FuncState *fs, OpCode op,
1023 expdesc *e1, expdesc *e2, int line) {
1024 int rk2 = luaK_exp2RK(fs, e2); /* both operands are "RK" */
1025 int rk1 = luaK_exp2RK(fs, e1);
1026 freeexps(fs, e1, e2);
1027 e1->u.info = luaK_codeABC(fs, op, 0, rk1, rk2); /* generate opcode */
1028 e1->k = VRELOCABLE; /* all those operations are relocatable */
1029 luaK_fixline(fs, line);
1030}
1031
1032
1033/*

Callers 1

luaK_posfixFunction · 0.85

Calls 4

luaK_exp2RKFunction · 0.85
freeexpsFunction · 0.85
luaK_codeABCFunction · 0.85
luaK_fixlineFunction · 0.85

Tested by

no test coverage detected