** Check whether table being indexed by instruction 'i' is the ** environment '_ENV' */
| 512 | ** environment '_ENV' |
| 513 | */ |
| 514 | static 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 | |
| 525 | static const char *getobjname (const Proto *p, int lastpc, int reg, |
no test coverage detected