MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaK_codecheckglobal

Function luaK_codecheckglobal

src/lcode.cpp:716–723  ·  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

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

Callers 1

checkglobalFunction · 0.85

Calls 4

luaK_exp2anyregFunction · 0.85
luaK_fixlineFunction · 0.85
luaK_codeABxFunction · 0.85
freeexpFunction · 0.85

Tested by

no test coverage detected