diff options
author | Andy Wingo <wingo@pobox.com> | 2010-02-19 16:55:36 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-02-19 16:55:36 +0100 |
commit | eaefabee34506324ecb1470ac5a4ba774381d038 (patch) | |
tree | 5f76c7fe3e10ccb460118799c56756dc054c6357 /libguile/vm-i-system.c | |
parent | ea6b18e82f3ac2122d07c80bc0f320ea839a25b6 (diff) | |
download | guile-eaefabee34506324ecb1470ac5a4ba774381d038.tar.gz |
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.
Diffstat (limited to 'libguile/vm-i-system.c')
-rw-r--r-- | libguile/vm-i-system.c | 9 |
1 files changed, 3 insertions, 6 deletions
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 (); } |