diff options
author | Andy Wingo <wingo@pobox.com> | 2018-08-06 17:00:45 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-08-06 17:00:45 +0200 |
commit | f4c50447dd74f4440f48cdeaebcb555cafd699b5 (patch) | |
tree | 6ff5dbb9151736c0d8934b82005d7fd676cc018c /libguile/vm.h | |
parent | dedf73d3703618439973f66e9a29ccbfc1a9f65d (diff) | |
download | guile-f4c50447dd74f4440f48cdeaebcb555cafd699b5.tar.gz |
Remove push continuation hook; return hook runs before FP pop
* libguile/frames.c (scm_frame_return_values): New function, for use
when a frame is at "return-values".
(scm_init_frames_builtins): Register frame-return-values.
* libguile/vm-engine.c (RETURN_HOOK): Rename from POP_CONTINUATION_HOOK.
(call, call-label): Remove PUSH_CONTINUATION_HOOK; it's unneeded, as
you can always check the FP from an apply hook.
(return-values): Run return hook before popping frame.
* libguile/vm.c (vm_dispatch_return_hook): Rename from
vm_dispatch_pop_continuation_hook. Remove push continuation hook.
(scm_vm_return_hook):
* libguile/vm.h (SCM_VM_PUSH_CONTINUATION_HOOK): Remove.
(SCM_VM_RETURN_HOOK): Rename from SCM_VM_POP_CONTINUATION_HOOK.
* module/system/vm/frame.scm (frame-return-values): Export.
* module/system/vm/trace.scm (print-return, trace-calls-to-procedure)
(trace-calls-in-procedure): Adapt to not receiving values as
arguments.
* module/system/vm/traps.scm (trap-in-procedure, trap-frame-finish):
Adapt to return hook coming from returning frame.
(program-sources-by-line): Update to use match instead of pmatch.
* module/system/vm/traps.scm (trap-in-dynamic-extent)
(trap-calls-to-procedure): Adapt to return hook not receiving values.
* module/system/vm/vm.scm: Remove push continuation hook and rename
return hook.
Diffstat (limited to 'libguile/vm.h')
-rw-r--r-- | libguile/vm.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/vm.h b/libguile/vm.h index a5cdacbf0..6d6bd4e11 100644 --- a/libguile/vm.h +++ b/libguile/vm.h @@ -27,8 +27,7 @@ enum { SCM_VM_APPLY_HOOK, - SCM_VM_PUSH_CONTINUATION_HOOK, - SCM_VM_POP_CONTINUATION_HOOK, + SCM_VM_RETURN_HOOK, SCM_VM_NEXT_HOOK, SCM_VM_ABORT_CONTINUATION_HOOK, SCM_VM_NUM_HOOKS, @@ -68,8 +67,7 @@ SCM_API SCM scm_call_with_stack_overflow_handler (SCM limit, SCM thunk, SCM handler); SCM_API SCM scm_vm_apply_hook (void); -SCM_API SCM scm_vm_push_continuation_hook (void); -SCM_API SCM scm_vm_pop_continuation_hook (void); +SCM_API SCM scm_vm_return_hook (void); SCM_API SCM scm_vm_abort_continuation_hook (void); SCM_API SCM scm_vm_next_hook (void); SCM_API SCM scm_vm_trace_level (void); |