mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Remove hook intrinsics: hooks are just for the VM
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Remove VM hook intrinsics, now that we're going to rely on the interpreter for stepping and breakpoints. * libguile/jit.c (struct scm_jit_state): Remove "hooks_enabled" member, now that we won't JIT. Remove all code related to calling hooks. * libguile/vm-engine.c (RUN_HOOK): Call hooks directly instead of through intrinsics. Use precise per-hook enable flags. * libguile/vm.c (DEFINE_INVOKE_HOOK): New helper. Use to define the hook invokers.
This commit is contained in:
parent
bf31fe4cf6
commit
0ccd2d0d9e
4 changed files with 26 additions and 73 deletions
|
@ -110,23 +110,23 @@
|
|||
#endif
|
||||
|
||||
#if VM_USE_HOOKS
|
||||
#define RUN_HOOK(h) \
|
||||
do { \
|
||||
if (SCM_UNLIKELY (VP->trace_level)) \
|
||||
{ \
|
||||
SYNC_IP (); \
|
||||
CALL_INTRINSIC (invoke_##h##_hook, (thread)); \
|
||||
CACHE_SP (); \
|
||||
} \
|
||||
#define RUN_HOOK(H, h) \
|
||||
do { \
|
||||
if (SCM_UNLIKELY (VP->hooks_enabled[SCM_VM_##H##_HOOK])) \
|
||||
{ \
|
||||
SYNC_IP (); \
|
||||
invoke_##h##_hook (thread); \
|
||||
CACHE_SP (); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define RUN_HOOK(h)
|
||||
#define RUN_HOOK(H, h)
|
||||
#endif
|
||||
|
||||
#define APPLY_HOOK() RUN_HOOK (apply)
|
||||
#define RETURN_HOOK() RUN_HOOK (return)
|
||||
#define NEXT_HOOK() RUN_HOOK (next)
|
||||
#define ABORT_HOOK() RUN_HOOK (abort)
|
||||
#define APPLY_HOOK() RUN_HOOK (APPLY, apply)
|
||||
#define RETURN_HOOK() RUN_HOOK (RETURN, return)
|
||||
#define NEXT_HOOK() RUN_HOOK (NEXT, next)
|
||||
#define ABORT_HOOK() RUN_HOOK (ABORT, abort)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue