diff options
author | Andy Wingo <wingo@pobox.com> | 2018-09-14 08:42:41 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-09-14 08:52:24 +0200 |
commit | bf31fe4cf6d75c96cc4ef29fea8808dd539da361 (patch) | |
tree | 31e180ad8951d60c87ae3f91b2cf0525f2a99f62 /libguile/vm-engine.c | |
parent | ce5c05ac4aa105a8a7b855c6cb5d811ef672cf5b (diff) | |
download | guile-bf31fe4cf6d75c96cc4ef29fea8808dd539da361.tar.gz |
VM manages hook sets itself
* libguile/vm.h (SCM_VM_ABORT_HOOK): Rename from
SCM_VM_ABORT_CONTINUATION_HOOK.
* libguile/vm-engine.c (ABORT_HOOK):
* libguile/vm.c (invoke_abort_hook): Adapt to SCM_VM_ABORT_HOOK name
change.
(reset_vm_hook_enabled): New helper.
(VM_ADD_HOOK, VM_REMOVE_HOOK): New helper macros, replacing
VM_DEFINE_HOOK.
(scm_vm_add_abort_hook_x, scm_vm_remove_abort_hook_x)
(scm_vm_add_apply_hook_x, scm_vm_remove_apply_hook_x)
(scm_vm_add_return_hook_x, scm_vm_remove_return_hook_x)
(scm_vm_add_next_hook_x, scm_vm_remove_next_hook_x): New functions,
replacing direct access to the hooks. Allows us to know in a more
fine-grained way when to enable hooks.
(scm_set_vm_trace_level_x): Use reset_vm_hook_enabled to update the
individual hook_enabled flags.
* module/statprof.scm:
* module/system/vm/coverage.scm:
* module/system/vm/traps.scm:
* module/system/vm/vm.scm: Adapt VM hook users to the new API.
Diffstat (limited to 'libguile/vm-engine.c')
-rw-r--r-- | libguile/vm-engine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 06006a190..2d9be38ab 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -126,7 +126,7 @@ #define APPLY_HOOK() RUN_HOOK (apply) #define RETURN_HOOK() RUN_HOOK (return) #define NEXT_HOOK() RUN_HOOK (next) -#define ABORT_CONTINUATION_HOOK() RUN_HOOK (abort) +#define ABORT_HOOK() RUN_HOOK (abort) @@ -780,7 +780,7 @@ VM_NAME (scm_thread *thread) intervening C frames to jump over, so we just continue directly. */ - ABORT_CONTINUATION_HOOK (); + ABORT_HOOK (); if (mcode) scm_jit_enter_mcode (thread, mcode); @@ -3025,7 +3025,7 @@ VM_NAME (scm_thread *thread) } -#undef ABORT_CONTINUATION_HOOK +#undef ABORT_HOOK #undef ALIGNED_P #undef APPLY_HOOK #undef BEGIN_DISPATCH_SWITCH |