luaA_indexAcceptable
function · lua · boundary
- Address
0x6f3410· 101 bytes, up to0x6f3474- Meaning
- Resolves a stack or pseudo index to its slot, null for an index past the top
- 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 16
- lua_type lua
- lua_iscfunction lua
- lua_isnumber lua
- lua_isuserdata lua
- lua_rawequal lua
- lua_equal lua
- lua_lessthan lua
- lua_tonumber lua
- lua_toboolean lua
- lua_tostring lua
- lua_strlen lua
- lua_tocfunction lua
- lua_touserdata lua
- lua_tothread lua
- lua_topointer lua
- lua_getmetatable lua
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.