mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
error if given an unrewindable partial continuation
* libguile/vm-engine.c (vm_error_continuation_not_rewindable): * libguile/vm-i-system.c (partial-cont-call): * libguile/vm.h (SCM_VM_CONT_PARTIAL_P): (SCM_VM_CONT_REWINDABLE_P): Fix a bug in which we weren't checking if a partial continuation was actually rewindable.
This commit is contained in:
parent
35ac785286
commit
b3950ad6d8
3 changed files with 11 additions and 2 deletions
|
@ -999,6 +999,10 @@ VM_DEFINE_INSTRUCTION (94, partial_cont_call, "partial-cont-call", 0, -1, 0)
|
|||
POP (intwinds);
|
||||
POP (vmcont);
|
||||
SYNC_REGISTER ();
|
||||
if (SCM_UNLIKELY (!SCM_VM_CONT_REWINDABLE_P (vmcont)))
|
||||
{ finish_args = vmcont;
|
||||
goto vm_error_continuation_not_rewindable;
|
||||
}
|
||||
vm_reinstate_partial_continuation (vm, vmcont, intwinds, sp + 1 - fp, fp);
|
||||
CACHE_REGISTER ();
|
||||
program = SCM_FRAME_PROGRAM (fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue