MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / gxf

Function gxf

3rd/lua-5.4.3/src/ldebug.c:514–522  ·  view source on GitHub ↗

** Check whether table being indexed by instruction 'i' is the ** environment '_ENV' */

Source from the content-addressed store, hash-verified

512** environment '_ENV'
513*/
514static const char *gxf (const Proto *p, int pc, Instruction i, int isup) {
515 int t = GETARG_B(i); /* table index */
516 const char *name; /* name of indexed variable */
517 if (isup) /* is an upvalue? */
518 name = upvalname(p, t);
519 else
520 getobjname(p, pc, t, &name);
521 return (name && strcmp(name, LUA_ENV) == 0) ? "global" : "field";
522}
523
524
525static const char *getobjname (const Proto *p, int lastpc, int reg,

Callers 1

getobjnameFunction · 0.85

Calls 2

upvalnameFunction · 0.85
getobjnameFunction · 0.85

Tested by

no test coverage detected