MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaK_prefix

Function luaK_prefix

Plugins/slua_unreal/External/lua/lcode.cpp:1064–1077  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1062** Aplly prefix operation 'op' to expression 'e'.
1063*/
1064void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {
1065 static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP};
1066 switch (op) {
1067 case OPR_MINUS: case OPR_BNOT: /* use 'ef' as fake 2nd operand */
1068 if (constfolding(fs, op + LUA_OPUNM, e, &ef))
1069 break;
1070 /* FALLTHROUGH */
1071 case OPR_LEN:
1072 codeunexpval(fs, cast(OpCode, op + OP_UNM), e, line);
1073 break;
1074 case OPR_NOT: codenot(fs, e); break;
1075 default: lua_assert(0);
1076 }
1077}
1078
1079
1080/*

Callers 1

subexprFunction · 0.85

Calls 3

constfoldingFunction · 0.85
codeunexpvalFunction · 0.85
codenotFunction · 0.85

Tested by

no test coverage detected