MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / codecomp

Function codecomp

deps/lua/src/lcode.c:673–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671
672
673static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,
674 expdesc *e2) {
675 int o1 = luaK_exp2RK(fs, e1);
676 int o2 = luaK_exp2RK(fs, e2);
677 freeexp(fs, e2);
678 freeexp(fs, e1);
679 if (cond == 0 && op != OP_EQ) {
680 int temp; /* exchange args to replace by `<' or `<=' */
681 temp = o1; o1 = o2; o2 = temp; /* o1 <==> o2 */
682 cond = 1;
683 }
684 e1->u.s.info = condjump(fs, op, cond, o1, o2);
685 e1->k = VJMP;
686}
687
688
689void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) {

Callers 1

luaK_posfixFunction · 0.85

Calls 3

luaK_exp2RKFunction · 0.85
freeexpFunction · 0.85
condjumpFunction · 0.85

Tested by

no test coverage detected