MCPcopy Create free account
hub / github.com/danomatika/ofxLua / luaK_prefix

Function luaK_prefix

libs/lua/lcode.c:1612–1626  ·  view source on GitHub ↗

** Apply prefix operation 'op' to expression 'e'. */

Source from the content-addressed store, hash-verified

1610** Apply prefix operation 'op' to expression 'e'.
1611*/
1612void luaK_prefix (FuncState *fs, UnOpr opr, expdesc *e, int line) {
1613 static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP};
1614 luaK_dischargevars(fs, e);
1615 switch (opr) {
1616 case OPR_MINUS: case OPR_BNOT: /* use 'ef' as fake 2nd operand */
1617 if (constfolding(fs, opr + LUA_OPUNM, e, &ef))
1618 break;
1619 /* else */ /* FALLTHROUGH */
1620 case OPR_LEN:
1621 codeunexpval(fs, unopr2op(opr), e, line);
1622 break;
1623 case OPR_NOT: codenot(fs, e); break;
1624 default: lua_assert(0);
1625 }
1626}
1627
1628
1629/*

Callers 1

subexprFunction · 0.85

Calls 5

luaK_dischargevarsFunction · 0.85
constfoldingFunction · 0.85
codeunexpvalFunction · 0.85
unopr2opFunction · 0.85
codenotFunction · 0.85

Tested by

no test coverage detected