MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_prefix

Function luaK_prefix

third-party/lua-5.1.5/src/lcode.c:689–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687
688
689void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) {
690 expdesc e2;
691 e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
692 switch (op) {
693 case OPR_MINUS: {
694 if (!isnumeral(e))
695 luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
696 codearith(fs, OP_UNM, e, &e2);
697 break;
698 }
699 case OPR_NOT: codenot(fs, e); break;
700 case OPR_LEN: {
701 luaK_exp2anyreg(fs, e); /* cannot operate on constants */
702 codearith(fs, OP_LEN, e, &e2);
703 break;
704 }
705 default: lua_assert(0);
706 }
707}
708
709
710void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {

Callers 1

subexprFunction · 0.70

Calls 4

isnumeralFunction · 0.70
luaK_exp2anyregFunction · 0.70
codearithFunction · 0.70
codenotFunction · 0.70

Tested by

no test coverage detected