benilla-re systems structs docs

lua_newthread

function · lua · unreached

Address
0x6f3030 · 55 bytes, up to 0x6f3066
Meaning
Pushes a new thread sharing the global state of the first
Confidence
verified, proof one
Finding
lua/api#pushing-values

Finding: Pushing values in lua: the C API

Seven functions create a value on the stack. lua_pushnumber stores tag 3 and a double, lua_pushlstring and lua_pushvfstring and lua_pushfstring intern or format a string, and lua_newuserdata and lua_newthread allocate an object, the first returning the address of its block. lua_pushupvalues pushes every upvalue of the running C function and answers their count. The five that allocate first run the collector when the allocation count [G+0x28] has reached the threshold [G+0x24].

functionnamedecided by
0x6f3810lua_pushnumbertag 3 stored (0x6f3816), the double from the stack to +8 (0x6f382f), ret 8
0x6f3840lua_pushlstringcollector test (0x6f384f), tag 4 (0x6f3862), luaS_newlstr (0x6f3876)
0x6f38c0lua_pushvfstringcollector test, then luaO_pushvfstring (0x6f38e3) with the caller's list
0x6f38f0lua_pushfstringcollector test, luaO_pushvfstring (0x6f3912) on the address of its own arguments
0x6f3030lua_newthreadcollector test (0x6f3039), luaE_newthread (0x6f3047), tag 8 (0x6f304f)
0x6f4560lua_newuserdataluaS_newudata (0x6f457c), tag 7 (0x6f4584), result eax+16 (0x6f45a0)
0x6f45b0lua_pushupvaluescount from closure+7 (0x6f45c7), growth check (0x6f45de), one 16-byte copy per upvalue (0x6f45f0 loop)

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 2

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