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

Function luaK_codecheckglobal

third-party/lua-5.5.0/src/lcode.c:715–722  ·  view source on GitHub ↗

** Get the value of 'var' in a register and generate an opcode to check ** whether that register is nil. 'k' is the index of the variable name ** in the list of constants. If its value cannot be encoded in Bx, a 0 ** will use '?' for the name. */

Source from the content-addressed store, hash-verified

713** will use '?' for the name.
714*/
715void luaK_codecheckglobal (FuncState *fs, expdesc *var, int k, int line) {
716 luaK_exp2anyreg(fs, var);
717 luaK_fixline(fs, line);
718 k = (k >= MAXARG_Bx) ? 0 : k + 1;
719 luaK_codeABx(fs, OP_ERRNNIL, var->u.info, k);
720 luaK_fixline(fs, line);
721 freeexp(fs, var);
722}
723
724
725/*

Callers 1

checkglobalFunction · 0.85

Calls 4

luaK_exp2anyregFunction · 0.70
luaK_fixlineFunction · 0.70
luaK_codeABxFunction · 0.70
freeexpFunction · 0.70

Tested by

no test coverage detected