MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / codearith

Function codearith

lua/lcode.c:668–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666
667
668void codearith (FuncState *fs, OpCode op, expdesc *e1, expdesc *e2) {
669 if (constfolding(op, e1, e2))
670 return;
671 else {
672 int o2 = (op != OP_UNM && op != OP_LEN) ? luaK_exp2RK(fs, e2) : 0;
673 int o1 = luaK_exp2RK(fs, e1);
674 if (o1 > o2) {
675 freeexp(fs, e1);
676 freeexp(fs, e2);
677 }
678 else {
679 freeexp(fs, e2);
680 freeexp(fs, e1);
681 }
682 e1->u.s.info = luaK_codeABC(fs, op, 0, o1, o2);
683 e1->k = VRELOCABLE;
684 }
685}
686
687
688static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,

Callers 4

assignmentFunction · 0.85
declarestatFunction · 0.85
luaK_prefixFunction · 0.85
luaK_posfixFunction · 0.85

Calls 4

constfoldingFunction · 0.85
luaK_exp2RKFunction · 0.85
freeexpFunction · 0.85
luaK_codeABCFunction · 0.85

Tested by

no test coverage detected