summaryrefslogtreecommitdiff
path: root/src/lj_api.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-03-18 23:38:05 +0100
committerMike Pall <mike>2011-03-18 23:38:05 +0100
commit642ae06916ecb36fb3f8ea5902de38a612cba356 (patch)
tree32ca483604ee926a820eb99b777fdc1d791b26d9 /src/lj_api.c
parent063182d79c4152b1b1e74b1226b5a7139969b8cf (diff)
downloadluajit-642ae06916ecb36fb3f8ea5902de38a612cba356.tar.gz
luajit-642ae06916ecb36fb3f8ea5902de38a612cba356.tar.bz2
luajit-642ae06916ecb36fb3f8ea5902de38a612cba356.zip
x64: Use external unwinding for lua_yield().
Diffstat (limited to 'src/lj_api.c')
-rw-r--r--src/lj_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 70834f8d..4942c1d6 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -1107,9 +1107,13 @@ LUA_API int lua_yield(lua_State *L, int nresults)
1107 top[2].fr.tp.ftsz = (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT; 1107 top[2].fr.tp.ftsz = (int)((char *)(top+3)-(char *)L->base)+FRAME_CONT;
1108 L->top = L->base = top+3; 1108 L->top = L->base = top+3;
1109 } 1109 }
1110#if LJ_TARGET_X64
1111 lj_err_throw(L, LUA_YIELD);
1112#else
1110 L->cframe = NULL; 1113 L->cframe = NULL;
1111 L->status = LUA_YIELD; 1114 L->status = LUA_YIELD;
1112 lj_vm_unwind_c(cf, LUA_YIELD); 1115 lj_vm_unwind_c(cf, LUA_YIELD);
1116#endif
1113 } 1117 }
1114 lj_err_msg(L, LJ_ERR_CYIELD); 1118 lj_err_msg(L, LJ_ERR_CYIELD);
1115 return 0; /* unreachable */ 1119 return 0; /* unreachable */