MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / codenot

Function codenot

Source/Misc/lua/src/lua.c:4263–4295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4261
4262
4263static void codenot (FuncState *fs, expdesc *e) {
4264luaK_dischargevars(fs, e);
4265switch (e->k) {
4266case VNIL: case VFALSE: {
4267e->k = VTRUE;
4268break;
4269}
4270case VK: case VKNUM: case VTRUE: {
4271e->k = VFALSE;
4272break;
4273}
4274case VJMP: {
4275invertjump(fs, e);
4276break;
4277}
4278case VRELOCABLE:
4279case VNONRELOC: {
4280discharge2anyreg(fs, e);
4281freeexp(fs, e);
4282e->u.s.info = luaK_codeABC(fs, OP_NOT, 0, e->u.s.info, 0);
4283e->k = VRELOCABLE;
4284break;
4285}
4286default: {
4287lua_assert(0); /* cannot happen */
4288break;
4289}
4290}
4291/* interchange true and false lists */
4292{ int temp = e->f; e->f = e->t; e->t = temp; }
4293removevalues(fs, e->f);
4294removevalues(fs, e->t);
4295}
4296
4297
4298void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {

Callers 1

luaK_prefixFunction · 0.85

Calls 6

luaK_dischargevarsFunction · 0.85
invertjumpFunction · 0.85
discharge2anyregFunction · 0.85
freeexpFunction · 0.85
luaK_codeABCFunction · 0.85
removevaluesFunction · 0.85

Tested by

no test coverage detected