lua_yield
function · lua · unreached
- Address
0x6f6860· 251 bytes, up to0x6f695a- Meaning
- Marks the current call suspended, moving its results to the base, and returns -1
- Confidence
- verified, proof two
- Finding
- lua/runtime#errors-and-protected-calls
Finding: Errors and protected calls in lua: calls, states and the collector
luaD_pcall runs a function through luaD_rawrunprotected and, on an error, restores the saved
nesting count, call record and hook flag, closes the open upvalues and puts the error value at the
saved top through seterrorobj: the message itself for a runtime or syntax error, not enough memory for status 4 and error in error handling for 5. lua_resume runs resume the same way,
resume starts a coroutine or finishes the call it yielded in, and lua_yield marks the call
record suspended and returns -1.
| function | name | decided by |
|---|---|---|
0x6f6680 | seterrorobj | status 4 not enough memory (0x6f66aa), 5 error in error handling (0x6f66d9), the others copy the message |
0x6f6960 | luaD_pcall | saves nesting, record, hook flag and handler (0x6f696a, 0x6f6975, 0x6f697a, 0x6f6984), luaD_rawrunprotected (0x6f6996), luaF_close (0x6f69ab), seterrorobj (0x6f69b5), restore_stack_limit (0x6f69da) |
0x6f6620 | lua_resume | luaD_rawrunprotected (0x6f6638), luaF_close (0x6f6658), seterrorobj (0x6f6665), restore_stack_limit (0x6f666f) |
0x6f67b0 | resume | cannot resume dead coroutine (0x6f67d2), luaD_precall (0x6f67e5), flag tests (0x6f67ef, 0x6f67f4), non-suspended (0x6f6838), luaV_execute (0x6f6842) |
0x6f6860 | lua_yield | attempt to yield across metamethod/C-call boundary (0x6f6880), cannot yield a C function (0x6f68a0), flag 0x10 set (0x6f694c), -1 (0x6f6953) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 1
- luaG_runerror lua
Calls and jumps by a bare address, from tables/calls.tsv.