diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-26 16:19:16 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-26 16:23:02 +0200 |
commit | e7778c62aa35ae10743cb4680df0bb3440163e26 (patch) | |
tree | a473ad138c7e2715ee493775b1379a6a9d8c9dc2 /libguile/vm-engine.c | |
parent | 03a9b7147965831b84506a9315bae215d4775dc3 (diff) | |
download | guile-e7778c62aa35ae10743cb4680df0bb3440163e26.tar.gz |
abort-to-prompt uses an intrinsic
* libguile/control.h:
* libguile/control.c (scm_i_make_composable_continuation): Rename from
make_partial_continuation and expose internally.
(scm_abort_to_prompt_star): Adapt to scm_i_vm_abort name change.
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Define
abort_to_prompt intrinsic.
* libguile/throw.c (abort_to_prompt): Adapt to scm_i_vm_abort name
change.
* libguile/vm-engine.c (abort): Use abort_to_prompt intrinsic.
* libguile/vm.c (capture_delimited_continuation): Move here from
control.c where it was named reify_partial_continuation.
(scm_i_vm_abort): Move from control.c where it was named
scm_c_abort (and only exposed internally).
(abort_to_prompt): New intrinsic, replacing vm_abort.
* libguile/vm.h: Add setjmp include and scm_i_vm_abort decl.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 9ff471100..7fc549970 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -781,15 +781,12 @@ VM_NAME (scm_thread *thread, jmp_buf *registers, int resume) */ VM_DEFINE_OP (16, abort, "abort", OP1 (X32)) { - uint32_t nlocals = FRAME_LOCALS_COUNT (); - - ASSERT (nlocals >= 2); /* FIXME: Really we should capture the caller's registers. Until then, manually advance the IP so that when the prompt resumes, it continues with the next instruction. */ ip++; SYNC_IP (); - vm_abort (VP, FP_REF (1), nlocals - 2, registers); + scm_vm_intrinsics.abort_to_prompt (thread, registers); /* vm_abort should not return */ abort (); |