summaryrefslogtreecommitdiff
path: root/libguile/vm-engine.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-06-26 17:16:19 +0200
committerAndy Wingo <wingo@pobox.com>2018-06-26 17:16:19 +0200
commit51e71a473f8ff114522a1b6fa054bdebeefb0575 (patch)
tree30888a9d6edfbb9648e08773e5e965bd15750ab0 /libguile/vm-engine.c
parentbf66fdca55f677195e7824946837e89f075bd262 (diff)
downloadguile-51e71a473f8ff114522a1b6fa054bdebeefb0575.tar.gz
Allow abort_to_prompt to avoid a longjmp
* libguile/vm-engine.c (abort): * libguile/vm.c (abort_to_prompt): Allow fallthrough if longjmp isn't needed.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r--libguile/vm-engine.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 7fc549970..71b3dfd5a 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -788,8 +788,12 @@ VM_NAME (scm_thread *thread, jmp_buf *registers, int resume)
SYNC_IP ();
scm_vm_intrinsics.abort_to_prompt (thread, registers);
- /* vm_abort should not return */
- abort ();
+ /* If abort_to_prompt returned, that means there were no
+ intervening C frames to jump over, so we just continue
+ directly. */
+ CACHE_REGISTER ();
+ ABORT_CONTINUATION_HOOK ();
+ NEXT (0);
}
/* builtin-ref dst:12 idx:12