mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
add scm_c_abort, wire it up to the abort opcode
* libguile/control.h: * libguile/control.c (scm_c_abort): Add an implementation of `abort', but it doesn't reify the continuation yet. * libguile/vm-i-system.c (abort): * libguile/vm.c (vm_abort): Wire up the call to `abort', avoiding consing the args into a list. * module/language/tree-il/compile-glil.scm (flatten): Add some compily bits that can allow the abort to be resumed.
This commit is contained in:
parent
ea6b18e82f
commit
eaefabee34
5 changed files with 92 additions and 16 deletions
|
@ -1509,13 +1509,10 @@ VM_DEFINE_INSTRUCTION (85, wind, "wind", 0, 2, 0)
|
|||
VM_DEFINE_INSTRUCTION (86, abort, "abort", 1, -1, -1)
|
||||
{
|
||||
unsigned n = FETCH ();
|
||||
SCM k;
|
||||
SCM args;
|
||||
POP_LIST (n);
|
||||
POP (args);
|
||||
POP (k);
|
||||
SYNC_REGISTER ();
|
||||
vm_abort (vm, k, args);
|
||||
if (sp - n - 1 <= SCM_FRAME_UPPER_ADDRESS (fp))
|
||||
goto vm_error_stack_underflow;
|
||||
vm_abort (vm, n);
|
||||
/* vm_abort should not return */
|
||||
abort ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue