MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / codebinexpval

Function codebinexpval

Plugins/slua_unreal/External/lua/lcode.cpp:1020–1028  ·  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

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

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