MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaK_infix

Function luaK_infix

ThirdParty/lua/lua/lcode.c:854–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852
853
854void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
855 switch (op) {
856 case OPR_AND: {
857 luaK_goiftrue(fs, v);
858 break;
859 }
860 case OPR_OR: {
861 luaK_goiffalse(fs, v);
862 break;
863 }
864 case OPR_CONCAT: {
865 luaK_exp2nextreg(fs, v); /* operand must be on the 'stack' */
866 break;
867 }
868 case OPR_ADD: case OPR_SUB:
869 case OPR_MUL: case OPR_DIV: case OPR_IDIV:
870 case OPR_MOD: case OPR_POW:
871 case OPR_BAND: case OPR_BOR: case OPR_BXOR:
872 case OPR_SHL: case OPR_SHR: {
873 if (!tonumeral(v, NULL)) luaK_exp2RK(fs, v);
874 break;
875 }
876 default: {
877 luaK_exp2RK(fs, v);
878 break;
879 }
880 }
881}
882
883
884void luaK_posfix (FuncState *fs, BinOpr op,

Callers 1

subexprFunction · 0.85

Calls 5

luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85
luaK_exp2nextregFunction · 0.85
tonumeralFunction · 0.85
luaK_exp2RKFunction · 0.85

Tested by

no test coverage detected