MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaK_storevar

Function luaK_storevar

ThirdParty/lua/lua/lcode.c:591–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589
590
591void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) {
592 switch (var->k) {
593 case VLOCAL: {
594 freeexp(fs, ex);
595 exp2reg(fs, ex, var->u.info);
596 return;
597 }
598 case VUPVAL: {
599 int e = luaK_exp2anyreg(fs, ex);
600 luaK_codeABC(fs, OP_SETUPVAL, e, var->u.info, 0);
601 break;
602 }
603 case VINDEXED: {
604 OpCode op = (var->u.ind.vt == VLOCAL) ? OP_SETTABLE : OP_SETTABUP;
605 int e = luaK_exp2RK(fs, ex);
606 luaK_codeABC(fs, op, var->u.ind.t, var->u.ind.idx, e);
607 break;
608 }
609 default: {
610 lua_assert(0); /* invalid var kind to store */
611 break;
612 }
613 }
614 freeexp(fs, ex);
615}
616
617
618void luaK_self (FuncState *fs, expdesc *e, expdesc *key) {

Callers 2

assignmentFunction · 0.85
funcstatFunction · 0.85

Calls 5

freeexpFunction · 0.85
exp2regFunction · 0.85
luaK_exp2anyregFunction · 0.85
luaK_codeABCFunction · 0.85
luaK_exp2RKFunction · 0.85

Tested by

no test coverage detected