MCPcopy Create free account
hub / github.com/defold/defold / luaK_infix

Function luaK_infix

engine/lua/src/lua/lcode.c:718–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716
717
718void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
719 switch (op) {
720 case OPR_AND: {
721 luaK_goiftrue(fs, v);
722 break;
723 }
724 case OPR_OR: {
725 luaK_goiffalse(fs, v);
726 break;
727 }
728 case OPR_CONCAT: {
729 luaK_exp2nextreg(fs, v); /* operand must be on the `stack' */
730 break;
731 }
732 case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:
733 case OPR_MOD: case OPR_POW: {
734 if (!isnumeral(v)) luaK_exp2RK(fs, v);
735 break;
736 }
737 default: {
738 luaK_exp2RK(fs, v);
739 break;
740 }
741 }
742}
743
744
745void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2) {

Callers 1

subexprFunction · 0.85

Calls 5

luaK_goiftrueFunction · 0.85
luaK_goiffalseFunction · 0.85
luaK_exp2nextregFunction · 0.85
isnumeralFunction · 0.85
luaK_exp2RKFunction · 0.85

Tested by

no test coverage detected