luaL_callmeta
function · lua · boundary
- Address
0x6f4d60· 87 bytes, up to0x6f4db6- Meaning
- Calls a metatable field of a value with the value as argument
- Confidence
- verified, proof one
- Finding
- lua/auxlib#metatables-and-fields
Finding: Metatables and fields in lua: the auxiliary library
luaL_newmetatable makes the registry entry of a type name, storing the table under the name
and the name under the table, and answers 0 when it exists. luaL_getmetatable reads it,
luaL_checkudata answers the block of a userdata whose metatable is registered under a name, and
luaL_getmetafield and luaL_callmeta read and call a metatable field. luaL_findstring
returns the position of a string in a null-ended list.
| function | name | decided by |
|---|---|---|
0x6f4980 | luaL_findstring | the compare loop steps both pointers by 2 (0x6f49ab), -1 at the list end (0x6f49cb) |
0x6f49e0 | luaL_newmetatable | lua_rawget (0x6f49f2), lua_newtable (0x6f4a18), two lua_rawset (0x6f4a39, 0x6f4a58) |
0x6f4a70 | luaL_getmetatable | lua_pushstring then a tail jmp to lua_rawget (0x6f4a80) |
0x6f4a90 | luaL_checkudata | lua_getmetatable (0x6f4a99), lua_rawget on the registry (0x6f4aa9), lua_tostring, compare, lua_touserdata (0x6f4afe) |
0x6f4d00 | luaL_getmetafield | lua_getmetatable (0x6f4d06), lua_rawget (0x6f4d25), lua_remove of the metatable (0x6f4d50) |
0x6f4d60 | luaL_callmeta | luaL_getmetafield (0x6f4d86), lua_pushvalue (0x6f4d99), lua_call (0x6f4da7) |
The derivation is in the doc.
Callers 1
Callees 4
- lua_gettop lua
- lua_pushvalue lua
- lua_call lua
- luaL_getmetafield lua
Calls and jumps by a bare address, from tables/calls.tsv.