call_binTM
function · lua · boundary
- Address
0x6f8670· 161 bytes, up to0x6f8710- Meaning
- Calls the metamethod of an operator found on the first or second operand and stores its result
- Confidence
- verified, proof one
- Finding
- lua/runtime#metamethod-access
Finding: Metamethod access in lua: calls, states and the collector
Indexing goes through luaV_gettable and luaV_settable. luaV_gettable reads a table directly
and, for a nil result, follows the __index of its metatable (luaV_index); a value that is no
table asks luaV_getnotable for __index, which raises attempt to index when there is none.
A function metamethod is called through callTMres (one result) or callTM (none), a table is
indexed again, at most 100 times (loop in gettable, loop in settable). call_binTM tries the
metamethod of each operand of an operator.
| function | name | decided by |
|---|---|---|
0x6f7cf0 | luaV_gettable | loop limit 100 (0x6f7cf7), loop in gettable (0x6f7d08), table test (0x6f7d10), luaH_get (0x6f7d1d), luaV_index (0x6f7d31), luaV_getnotable (0x6f7d47) |
0x6f7d60 | luaV_index | cached absence flag (0x6f7d6f), luaT_gettm (0x6f7d81), function tag (0x6f7d97) to callTMres (0x6f7da3), else luaV_gettable (0x6f7db8) |
0x6f7ba0 | luaT_gettm | luaH_getstr (0x6f7bac), nil result sets bit event of [t+6] (0x6f7bbc) and answers null |
0x6f7dd0 | callTMres | three 16-byte pushes, growth check (0x6f7ea4), luaD_call with one result (0x6f7ec7) |
0x6f7ee0 | luaV_getnotable | luaT_gettmbyobj (0x6f7eec), nil raises index (0x6f7f01), function to callTMres (0x6f7f14), else luaV_gettable (0x6f7f2f) |
0x6f7f40 | luaV_settable | luaH_set (0x6f7f64), flag test (0x6f7f74), luaT_gettm (0x6f7f8b), luaT_gettmbyobj (0x6f7fd7), limit (0x6f7ffa), callTM (0x6f802c) |
0x6f8040 | callTM | four 16-byte pushes, growth check (0x6f8158), luaD_call with no result (0x6f817b) |
0x6f8670 | call_binTM | luaT_gettmbyobj twice (0x6f8684, 0x6f8697), function test (0x6f869c), callTMres (0x6f86b3) |
The derivation is in the doc.
Callers 3
- luaV_concat lua
- luaV_execute lua
- Arith lua
Callees 2
- luaT_gettmbyobj lua
- callTMres lua
Calls and jumps by a bare address, from tables/calls.tsv.