Don't use stack unwinding for lua_yield().

This commit is contained in:
Mike Pall
2012-10-09 13:19:57 +02:00
parent da682b0e91
commit eabfdfe1aa
6 changed files with 35 additions and 17 deletions

View File

@@ -269,10 +269,12 @@ static void build_subroutines(BuildCtx *ctx)
| sub RA, RA, #8
|
|->vm_returnc:
| add RC, RC, #8 // RC = (nresults+1)*8.
| ands CARG1, PC, #FRAME_TYPE
| adds RC, RC, #8 // RC = (nresults+1)*8.
| mov CRET1, #LUA_YIELD
| beq ->vm_unwind_c_eh
| str RC, SAVE_MULTRES
| beq ->BC_RET_Z // Handle regular return to Lua.
| ands CARG1, PC, #FRAME_TYPE
| beq ->BC_RET_Z // Handle regular return to Lua.
|
|->vm_return:
| // BASE = base, RA = resultptr, RC/MULTRES = (nresults+1)*8, PC = return