MCPcopy Create free account
hub / github.com/cuberite/cuberite / luaK_prefix

Function luaK_prefix

lib/lua/src/lcode.c:697–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

subexprFunction · 0.85

Calls 4

isnumeralFunction · 0.85
luaK_exp2anyregFunction · 0.85
codearithFunction · 0.85
codenotFunction · 0.85

Tested by

no test coverage detected