add vm-abort-continuation-hook, vm-restore-continuation-hook
authorAndy Wingo <wingo@pobox.com>
Thu, 16 Sep 2010 10:48:41 +0000 (12:48 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 16 Sep 2010 10:48:41 +0000 (12:48 +0200)
commitf312025167c5a93aacae69aef63be2fdc6bed7c6
tree6290a69c0e5c2db70ca83281cea8b47175821adc
parentc45d4d775d47bd80650e9888bf47815a03b04332
add vm-abort-continuation-hook, vm-restore-continuation-hook

* libguile/vm-i-system.c (call_cc, tail_call_cc): Call the new
  RESTORE_CONTINUATION_HOOK when a continuation is restored.
  (prompt): Call the new ABORT_CONTINUATION_HOOK when entering the abort
  handler's continuation.

* libguile/vm-engine.h (ABORT_CONTINUATION_HOOK)
  (RESTORE_CONTINUATION_HOOK):
* libguile/vm.h (SCM_VM_ABORT_CONTINUATION_HOOK)
  (SCM_VM_RESTORE_CONTINUATION_HOOK):
* libguile/vm.c: (scm_vm_abort_continuation_hook): New hook, called when
  entering an abort handler.
  (scm_vm_restore_continuation_hook): New hook, called after returning
  to a continuation.

* module/system/vm/vm.scm: Add hooks to export list.
libguile/vm-engine.h
libguile/vm-i-system.c
libguile/vm.c
libguile/vm.h
module/system/vm/vm.scm