Skip to content

Commit

Permalink
Remove unused gotolexotic function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 28, 2017
1 parent f302bbe commit fdd04a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
31 changes: 0 additions & 31 deletions src/core/exceptions.c
Expand Up @@ -676,37 +676,6 @@ void MVM_exception_resume(MVMThreadContext *tc, MVMObject *ex_obj) {
MVM_frame_unwind_to(tc, target, ex->body.resume_addr, 0, NULL);
}

/* Unwinds to a lexotic captured handler. */
void MVM_exception_gotolexotic(MVMThreadContext *tc, MVMint32 handler_idx, MVMStaticFrame *sf) {
MVMFrame *f, *search;
f = NULL;
search = tc->cur_frame;
while (search) {
f = search;
while (f) {
if (f->static_info == sf)
break;
f = f->outer;
}
if (f)
break;
search = search->caller;
}
if (f && in_caller_chain(tc, f)) {
LocatedHandler lh;
lh.frame = f;
lh.handler = &(MVM_frame_effective_handlers(f)[handler_idx]);
if (f->spesh_cand && f->spesh_cand->jitcode)
lh.jit_handler = &(f->spesh_cand->jitcode->handlers[handler_idx]);
else
lh.jit_handler = NULL;
run_handler(tc, lh, NULL, MVM_EX_CAT_RETURN, NULL);
}
else {
MVM_exception_throw_adhoc(tc, "Too late to invoke lexotic return");
}
}

/* Panics and shuts down the VM. Don't do this unless it's something quite
* unrecoverable, and a thread context is either not available or stands a
* good chance of being too corrupt to print (or is not relevant information).
Expand Down
1 change: 0 additions & 1 deletion src/core/exceptions.h
Expand Up @@ -84,7 +84,6 @@ void MVM_exception_die(MVMThreadContext *tc, MVMString *str, MVMRegister *rr);
void MVM_exception_throwobj(MVMThreadContext *tc, MVMuint8 mode, MVMObject *exObj, MVMRegister *resume_result);
void MVM_exception_throwpayload(MVMThreadContext *tc, MVMuint8 mode, MVMuint32 cat, MVMObject *payload, MVMRegister *resume_result);
void MVM_exception_resume(MVMThreadContext *tc, MVMObject *exObj);
void MVM_exception_gotolexotic(MVMThreadContext *tc, MVMint32 handler_idx, MVMStaticFrame *sf);
MVM_PUBLIC MVM_NO_RETURN void MVM_panic_allocation_failed(size_t len) MVM_NO_RETURN_GCC;
MVM_PUBLIC MVM_NO_RETURN void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) MVM_NO_RETURN_GCC MVM_FORMAT(printf, 2, 3);
MVM_PUBLIC MVM_NO_RETURN void MVM_oops(MVMThreadContext *tc, const char *messageFormat, ...) MVM_NO_RETURN_GCC MVM_FORMAT(printf, 2, 3);
Expand Down

0 comments on commit fdd04a6

Please sign in to comment.