less overhead for handling interrupts in the vm
authorAndy Wingo <wingo@pobox.com>
Fri, 11 Dec 2009 10:15:12 +0000 (11:15 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 11 Dec 2009 10:15:12 +0000 (11:15 +0100)
commite8c377721438ea072ef211a940cd067db52bcb94
treeb114aea92a7477818f85b04dd4b9042f5515cfc1
parentaa3819aa343b0ba39b3e6ca4fbf90f15a8e36cdf
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.
libguile/__scm.h
libguile/vm-engine.h
libguile/vm-i-system.c