benilla-re systems structs docs

removekey

function · lua · orchestration

Address
0x6f79d0 · 27 bytes, up to 0x6f79ea
Signature
void __fastcall (void *n)
Meaning
Makes a node's value nil with the current context word and a collectable key's tag -1
Confidence
verified, proof one
Finding
lua/gc#clearing-weak-keys
Test
lua::cleartablekeys_whole

Finding: Clearing weak keys in lua: marking

cleartablekeys(list) walks a list of tables through +0x18, each one's nodes from the last; a node whose key valismarked refuses is removed by removekey: its value made nil with the current context word, a collectable key's tag set to −1 (LUA_TNONE), the node kept. valismarked(o) first marks a string, so every string key of a weak-keyed table survives, its value nil or not; then it answers 1 for a tag below 4, else the mark bit. mark clears the values of the both-weak and value-weak lists, then, after the second propagation, the keys of the first both-weak list and of the key-weak list, the values of the value-weak list, and both of the second both-weak list.

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.