closelistfield
function · lua · boundary
- Address
0x6fd6c0· 72 bytes, up to0x6fd707- Meaning
- Puts a pending list item of a constructor in a register and flushes every 32 items
- Confidence
- verified, proof one
- Finding
- lua/compiler#table-constructors
Finding: Table constructors in lua: the compiler
constructor emits OP_NEWTABLE, then reads fields separated by , or ;: a name followed by
= or a bracketed key is a keyed field, compiled at once into OP_SETTABLE; anything else is a
positional item. Positional items wait in registers and are stored by OP_SETLIST every 32 items,
and the last group by OP_SETLISTO when its last item is a call, which then keeps all its results.
The table's B operand gets the array size through luaO_int2fb and C the log2 of the keyed
count plus 1.
| function | name | decided by |
|---|---|---|
0x6fd430 | constructor | OP_NEWTABLE (0x6fd453), { (0x6fd493), closelistfield (0x6fd4b6), [ and name with = ahead (0x6fd4be..0x6fd4db), } (0x6fd51f), lastlistfield (0x6fd529), luaO_int2fb (0x6fd53c), luaO_log2 (0x6fd563) |
0x6fd590 | recfield | name count limit (0x6fd5bc), checkname (0x6fd5cd) or luaY_index (0x6fd5d7), = (0x6fd5e3), OP_SETTABLE (0x6fd620), free register restored (0x6fd629) |
0x6fd790 | listfield | expr (0x6fd796), limit 0x3ffff (0x6fd7aa), counts (0x6fd7b8, 0x6fd7bb) |
0x6fd6c0 | closelistfield | no item (0x6fd6c3), luaK_exp2nextreg (0x6fd6cb), 32 pending (0x6fd6d0), OP_SETLIST (0x6fd6ef) |
0x6fd710 | lastlistfield | none pending (0x6fd716), call (0x6fd71f), luaK_setcallreturns -1 (0x6fd726), OP_SETLISTO (0x6fd73e), OP_SETLIST (0x6fd770) |
The derivation is in the doc.
Callers 1
- constructor lua
Callees 2
- luaK_exp2nextreg lua
- luaK_codeABx lua
Calls and jumps by a bare address, from tables/calls.tsv.