lua_equal
function · lua · unreached
- Address
0x6f3590· 71 bytes, up to0x6f35d6- Meaning
- Compares two stack values with the equality metamethod, 0 when the tags differ
- Confidence
- verified, proof two
- Finding
- lua/api#index-lookup-and-tests
Finding: Index lookup and tests in lua: the C API
luaA_indexAcceptable resolves an index to its slot and answers null where upstream's
acceptable-index rule does: a positive index at or past the top, and an upvalue past the running
function's count. lua_typename maps a tag to its name and -1 to no value. The five tests
answer 0 or 1: lua_iscfunction for a function with a C body, lua_isuserdata for tags 7 and 2,
lua_rawequal through the raw comparison, lua_equal when the tags match and
luaV_equalval agrees, lua_lessthan through luaV_lessthan. A null slot answers 0.
| function | name | decided by |
|---|---|---|
0x6f3410 | luaA_indexAcceptable | cmp edx,[ecx+8] with sbb eax,eax; and eax,edx (0x6f341e) nulls a positive slot at or past the top |
0x6f3480 | lua_typename | cmp edx,-1 (0x6f3480), the name table s_luaTypeNames indexed at 0x6f348a |
0x6f34a0 | lua_iscfunction | tag 6 at 0x6f34a9, then the C-closure byte at closure+6 |
0x6f3530 | lua_isuserdata | compares the tag with 7 (0x6f353b) and 2 |
0x6f3550 | lua_rawequal | calls luaO_rawequalObj (0x6f3574) only when both slots are non-null |
0x6f3590 | lua_equal | tags compared, then luaV_equalval (0x6f35bb) |
0x6f35e0 | lua_lessthan | calls luaV_lessthan (0x6f3605) only when both slots are non-null |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 2
- luaA_indexAcceptable lua
- luaV_equalval lua
Calls and jumps by a bare address, from tables/calls.tsv.