mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
less overhead for handling interrupts in the vm
* libguile/__scm.h (SCM_ASYNC_TICK): Add some branch prediction. (SCM_ASYNC_TICK_WITH_CODE): New helper for when BUILDING_LIBGUILE, runs code only if we're going to call async_click(). * libguile/vm-engine.h (VM_HANDLE_INTERRUPTS): New helper, uses SCM_ASYNC_TICK_WITH_CODE to only save regs if we'll handle an interrupt. * libguile/vm-i-system.c (call, goto/args, return): use VM_HANDLE_INTERRUPTS.
This commit is contained in:
parent
aa3819aa34
commit
e8c3777214
3 changed files with 26 additions and 12 deletions
|
@ -228,6 +228,9 @@
|
|||
#define EXIT_HOOK() RUN_HOOK (SCM_VM_EXIT_HOOK)
|
||||
#define RETURN_HOOK() RUN_HOOK (SCM_VM_RETURN_HOOK)
|
||||
|
||||
#define VM_HANDLE_INTERRUPTS \
|
||||
SCM_ASYNC_TICK_WITH_CODE (SYNC_REGISTER ())
|
||||
|
||||
|
||||
/*
|
||||
* Stack operation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue