mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
VM hooks take no values
* libguile/vm-engine.c (RUN_HOOK0, RUN_HOOK1): Remove. (RUN_HOOK): Take hook name. (APPLY_HOOK, RETURN_HOOK, NEXT_HOOK, ABORT_CONTINUATION_HOOK): Use RUN_HOOK. * libguile/vm.c (vm_dispatch_hook): Remove value count arg; hooks no longer receive values (e.g. the return hook now uses frame-return-values). (vm_dispatch_abort_hook): Remove value count, which was bogus because the active frame was the continuation which might contain other locals, potentially unboxed, not the implicit return-values frame. In the future we could push on an implicit return-values frame instead. * module/system/vm/traps.scm (trap-in-procedure, trap-frame-finish): (trap-in-dynamic-extent, trap-calls-to-procedure): Adapt abort hooks to not take values. They weren't being used anyway!
This commit is contained in:
parent
f4c50447dd
commit
0a01963d07
3 changed files with 20 additions and 46 deletions
|
@ -110,25 +110,23 @@
|
|||
#endif
|
||||
|
||||
#if VM_USE_HOOKS
|
||||
#define RUN_HOOK(exp) \
|
||||
#define RUN_HOOK(h) \
|
||||
do { \
|
||||
if (SCM_UNLIKELY (VP->trace_level)) \
|
||||
{ \
|
||||
SYNC_IP (); \
|
||||
exp; \
|
||||
vm_dispatch_##h##_hook (thread); \
|
||||
CACHE_SP (); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define RUN_HOOK(exp)
|
||||
#define RUN_HOOK(h)
|
||||
#endif
|
||||
#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 RETURN_HOOK() RUN_HOOK0 (return)
|
||||
#define NEXT_HOOK() RUN_HOOK0 (next)
|
||||
#define ABORT_CONTINUATION_HOOK() RUN_HOOK0 (abort)
|
||||
#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)
|
||||
|
||||
|
||||
|
||||
|
@ -3011,8 +3009,6 @@ VM_NAME (scm_thread *thread)
|
|||
#undef NEXT_HOOK
|
||||
#undef RETURN_HOOK
|
||||
#undef RUN_HOOK
|
||||
#undef RUN_HOOK0
|
||||
#undef RUN_HOOK1
|
||||
#undef SYNC_IP
|
||||
#undef UNPACK_8_8_8
|
||||
#undef UNPACK_8_16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue