traversetable
function · lua · primitive
- Address
0x6f7590· 375 bytes, up to0x6f7706- Signature
void __fastcall (void *st, void *h)- Meaning
- Marks a table's metatable, its weak mode and the keys and values its mode leaves strong
- Confidence
- verified, proof one
- Finding
- lua/gc#traversing-a-table
- Test
lua::traversetable_whole
Finding: Traversing a table in lua: marking
traversetable(st, h) marks the metatable unless bit 0 or 4 of its byte is set. Unless the
metatable's flag bit 3 marks __mode absent, it asks luaT_gettm; a string mode containing k
makes the keys weak and v the values, either rewriting bits 1 and 2 of the table's byte and
pushing the table on the list for keys, values or both. Then, unless the values are weak,
the array slots from the last; and each node from the last whose value is not nil: its key unless
the keys are weak, then its value unless the values are weak. Only a collectable (tag 4 or more),
unmarked slot is marked; a node with a nil value keeps its key.
The derivation is in the doc.
Callers 1
- 0x6f7510 lua
Callees 3
- _strchr crt
- 0x6f74a0 lua
- luaT_gettm lua
Calls and jumps by a bare address, from tables/calls.tsv.