diff options
author | Andy Wingo <wingo@pobox.com> | 2013-05-23 15:07:37 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-05-27 07:13:13 +0200 |
commit | c850a0ff4d0073364612ff5785bda8217ea9ae7f (patch) | |
tree | 82d3ce7de2f7eee2f0940eb72b502d2038ab1569 /libguile/vm-i-system.c | |
parent | 27319ffaa90dc5789843d8b80842b9a6d36120e1 (diff) | |
download | guile-c850a0ff4d0073364612ff5785bda8217ea9ae7f.tar.gz |
pop-continuation abort-continuation hooks pass return vals directly
* doc/ref/api-debug.texi (VM Hooks): Update documentation.
* libguile/vm.c (vm_dispatch_hook):
* libguile/vm-engine.c: Rework the hook machinery so that they can
receive an arbitrary number of arguments. The return and abort
hooks will pass the values that they return to their continuations.
(vm_engine): Adapt to ABORT_CONTINUATION_HOOK change.
* libguile/vm-i-system.c (return, return/values): Adapt to
POP_CONTINUATION_HOOK change.
* module/system/vm/frame.scm (frame-return-values): Remove. The
pop-continuation-hook will pass the values directly.
* module/system/vm/trace.scm (print-return):
(trace-calls-to-procedure):
(trace-calls-in-procedure): Update to receive return values
directly.
* module/system/vm/traps.scm (trap-in-procedure)
(trap-in-dynamic-extent): Ignore return values.
(trap-frame-finish, trap-calls-in-dynamic-extent)
(trap-calls-to-procedure): Pass return values to the handlers.
Diffstat (limited to 'libguile/vm-i-system.c')
-rw-r--r-- | libguile/vm-i-system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index 4445d0c30..f64982260 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -1150,7 +1150,7 @@ VM_DEFINE_INSTRUCTION (68, tail_call_cc, "tail-call/cc", 0, 1, 1) VM_DEFINE_INSTRUCTION (69, return, "return", 0, 1, 1) { vm_return: - POP_CONTINUATION_HOOK (1); + POP_CONTINUATION_HOOK (sp, 1); VM_HANDLE_INTERRUPTS; @@ -1189,7 +1189,7 @@ VM_DEFINE_INSTRUCTION (70, return_values, "return/values", 1, -1, -1) that perhaps it might be used without declaration. Fooey to that, I say. */ nvalues = FETCH (); vm_return_values: - POP_CONTINUATION_HOOK (nvalues); + POP_CONTINUATION_HOOK (sp + 1 - nvalues, nvalues); VM_HANDLE_INTERRUPTS; |