From eaefabee34506324ecb1470ac5a4ba774381d038 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 19 Feb 2010 16:55:36 +0100 Subject: 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. --- libguile/vm-i-system.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libguile/vm-i-system.c') diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index 98ef189e4..925c8d317 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -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 (); } -- cgit v1.2.3