** Executes "full continuation" (everything in the stack) of a ** previously interrupted coroutine until the stack is empty (or another ** interruption long-jumps out of the loop). If the coroutine is ** recovering from an error, 'ud' points to the error status, which must ** be passed to the first continuation function (otherwise the default ** status is LUA_YIELD). */
| 576 | ** status is LUA_YIELD). |
| 577 | */ |
| 578 | static void unroll(lua_State *L, void *ud) { |
| 579 | if (ud != nullptr) /* error status? */ |
| 580 | finishCcall(L, *(int *)ud); /* finish 'lua_pcallk' callee */ |
| 581 | while (L->ci != &L->base_ci) { /* something in the stack */ |
| 582 | if (!isLua(L->ci)) /* C function? */ |
| 583 | finishCcall(L, LUA_YIELD); /* complete its execution */ |
| 584 | else { /* Lua function */ |
| 585 | luaV_finishOp(L); /* finish interrupted instruction */ |
| 586 | luaV_execute(L); /* execute down to higher C 'boundary' */ |
| 587 | } |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | |
| 592 | /* |
no test coverage detected