diff options
Diffstat (limited to 'src/lj_err.c')
-rw-r--r-- | src/lj_err.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index 3b44c984..007d9d9f 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -99,8 +99,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
99 | TValue *top = restorestack(L, -nres); | 99 | TValue *top = restorestack(L, -nres); |
100 | if (frame < top) { /* Frame reached? */ | 100 | if (frame < top) { /* Frame reached? */ |
101 | if (errcode) { | 101 | if (errcode) { |
102 | L->cframe = cframe_prev(cf); | ||
103 | L->base = frame+1; | 102 | L->base = frame+1; |
103 | L->cframe = cframe_prev(cf); | ||
104 | unwindstack(L, top); | 104 | unwindstack(L, top); |
105 | } | 105 | } |
106 | return cf; | 106 | return cf; |
@@ -119,8 +119,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
119 | #endif | 119 | #endif |
120 | #if LJ_UNWIND_EXT | 120 | #if LJ_UNWIND_EXT |
121 | if (errcode) { | 121 | if (errcode) { |
122 | L->cframe = cframe_prev(cf); | ||
123 | L->base = frame_prevd(frame) + 1; | 122 | L->base = frame_prevd(frame) + 1; |
123 | L->cframe = cframe_prev(cf); | ||
124 | unwindstack(L, frame); | 124 | unwindstack(L, frame); |
125 | } else if (cf != stopcf) { | 125 | } else if (cf != stopcf) { |
126 | cf = cframe_prev(cf); | 126 | cf = cframe_prev(cf); |
@@ -144,8 +144,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
144 | return cf; | 144 | return cf; |
145 | } | 145 | } |
146 | if (errcode) { | 146 | if (errcode) { |
147 | L->cframe = cframe_prev(cf); | ||
148 | L->base = frame_prevd(frame) + 1; | 147 | L->base = frame_prevd(frame) + 1; |
148 | L->cframe = cframe_prev(cf); | ||
149 | unwindstack(L, frame); | 149 | unwindstack(L, frame); |
150 | } | 150 | } |
151 | return cf; | 151 | return cf; |
@@ -166,8 +166,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
166 | } | 166 | } |
167 | if (frame_typep(frame) == FRAME_PCALL) | 167 | if (frame_typep(frame) == FRAME_PCALL) |
168 | hook_leave(G(L)); | 168 | hook_leave(G(L)); |
169 | L->cframe = cf; | ||
170 | L->base = frame_prevd(frame) + 1; | 169 | L->base = frame_prevd(frame) + 1; |
170 | L->cframe = cf; | ||
171 | unwindstack(L, L->base); | 171 | unwindstack(L, L->base); |
172 | } | 172 | } |
173 | return (void *)((intptr_t)cf | CFRAME_UNWIND_FF); | 173 | return (void *)((intptr_t)cf | CFRAME_UNWIND_FF); |
@@ -175,8 +175,8 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode) | |||
175 | } | 175 | } |
176 | /* No C frame. */ | 176 | /* No C frame. */ |
177 | if (errcode) { | 177 | if (errcode) { |
178 | L->cframe = NULL; | ||
179 | L->base = tvref(L->stack)+1; | 178 | L->base = tvref(L->stack)+1; |
179 | L->cframe = NULL; | ||
180 | unwindstack(L, L->base); | 180 | unwindstack(L, L->base); |
181 | if (G(L)->panic) | 181 | if (G(L)->panic) |
182 | G(L)->panic(L); | 182 | G(L)->panic(L); |