mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Minor optimizations to debug hook dispatch
* libguile/vm.c (scm_call_n): Only call hooks if the engine supports it. (vm_dispatch_abort_hook, vm_dispatch_next_hook) (vm_dispatch_pop_continuation_hook, vm_dispatch_push_continuation_hook) (vm_dispatch_apply_hook, vm_dispatch_hook): Take a thread as arg instead of VM, because that will probably already be in a register in the VM. Given that all values are taken relative to the SP, no need to pass that either. * libguile/vm-engine.c (RUN_HOOK0, RUN_HOOK1): Update appropriately.
This commit is contained in:
parent
9c8c4060dd
commit
19cff78bb5
2 changed files with 26 additions and 25 deletions
|
@ -122,8 +122,8 @@
|
|||
#else
|
||||
#define RUN_HOOK(exp)
|
||||
#endif
|
||||
#define RUN_HOOK0(h) RUN_HOOK (vm_dispatch_##h##_hook (VP))
|
||||
#define RUN_HOOK1(h, arg) RUN_HOOK (vm_dispatch_##h##_hook (VP, arg))
|
||||
#define RUN_HOOK0(h) RUN_HOOK (vm_dispatch_##h##_hook (thread))
|
||||
#define RUN_HOOK1(h, arg) RUN_HOOK (vm_dispatch_##h##_hook (thread, arg))
|
||||
|
||||
#define APPLY_HOOK() RUN_HOOK0 (apply)
|
||||
#define PUSH_CONTINUATION_HOOK() RUN_HOOK0 (push_continuation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue