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

@@ -443,6 +443,7 @@ static void build_subroutines(BuildCtx *ctx)
|
|->vm_returnc:
| add RD, 1 // RD = nresults+1
| jz ->vm_unwind_yield
| mov MULTRES, RD
| test PC, FRAME_TYPE
| jz ->BC_RET_Z // Handle regular return to Lua.
@@ -526,6 +527,10 @@ static void build_subroutines(BuildCtx *ctx)
| mov BASE, L:RB->top // Need the (realloced) L->top in BASE.
| jmp <3
|
|->vm_unwind_yield:
| mov al, LUA_YIELD
| jmp ->vm_unwind_c_eh
|
|->vm_unwind_c@8: // Unwind C stack, return from vm_pcall.
| // (void *cframe, int errcode)
|.if X64