Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions src/ldo.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,15 +574,15 @@ int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func,
ci->top.p = func + 1 + fsize; /* top for new function */
lua_assert(ci->top.p <= L->stack_last.p);
#ifdef USE_YK
// If this is a recursive call and we don't yet have a yk_location,
// create one now.
if (p->called && yk_location_is_null(p->yklocs[0])) {
p->yklocs[0] = yk_location_new();
if (yk_is_interpreting()) {
// If this is a recursive call and we don't yet have a yk_location,
// create one now.
if (p->called && yk_location_is_null(p->yklocs[0])) {
p->yklocs[0] = yk_location_new();
#if YKLUA_DEBUG_STRS
yk_location_set_debug_str(&p->yklocs[0], p->instdebugstrs[0]);
yk_location_set_debug_str(&p->yklocs[0], p->instdebugstrs[0]);
#endif
} else if (!p->called) {
p->called = true;
}
}
#endif
ci->u.l.savedpc = p->code; /* starting point */
Expand Down Expand Up @@ -631,15 +631,17 @@ CallInfo *luaD_precall (lua_State *L, StkId func, int nresults) {
setnilvalue(s2v(L->top.p++)); /* complete missing arguments */
lua_assert(ci->top.p <= L->stack_last.p);
#ifdef USE_YK
// If this is a recursive call and we don't yet have a yk_location,
// create one now.
if (p->called && yk_location_is_null(p->yklocs[0])) {
p->yklocs[0] = yk_location_new();
if (yk_is_interpreting()) {
// If this is a recursive call and we don't yet have a yk_location,
// create one now.
if (p->called && yk_location_is_null(p->yklocs[0])) {
p->yklocs[0] = yk_location_new();
#if YKLUA_DEBUG_STRS
yk_location_set_debug_str(&p->yklocs[0], p->instdebugstrs[0]);
yk_location_set_debug_str(&p->yklocs[0], p->instdebugstrs[0]);
#endif
} else if (!p->called) {
p->called = true;
} else if (!p->called) {
p->called = true;
}
}
#endif
return ci;
Expand Down
4 changes: 3 additions & 1 deletion src/lvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,9 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
}
ret: /* return from a Lua function */
#ifdef USE_YK
cl->p->called = false;
if (yk_is_interpreting()) {
cl->p->called = false;
}
#endif
if (ci->callstatus & CIST_FRESH)
return; /* end this frame */
Expand Down