1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

VM accessors take VM as implicit argument, not explicit argument

* libguile/vm.h:
* libguile/vm.c:
  (scm_vm_apply_hook, scm_vm_push_continuation_hook,
  scm_vm_pop_continuation_hook, scm_vm_abort_continuation_hook,
  scm_vm_restore_continuation_hook, scm_vm_next_hook,
  scm_vm_trace_level, scm_set_vm_trace_level_x, scm_vm_engine,
  scm_set_vm_engine_x, scm_c_set_vm_engine_x): The VM argument is now
  implicit: the VM for the current thread.

* doc/ref/api-debug.texi (VM Hooks): Try to adapt.

* module/ice-9/command-line.scm:
* module/statprof.scm:
* module/system/vm/coverage.scm:
* module/system/vm/trace.scm:
* module/system/vm/trap-state.scm:
* module/system/vm/traps.scm:
* test-suite/tests/control.test:
* test-suite/tests/eval.test: Adapt users that set hooks or ensure that
  we have a debug engine.
This commit is contained in:
Andy Wingo 2013-11-21 16:10:41 +01:00
parent 6b4ba76d05
commit 972275eee5
11 changed files with 107 additions and 164 deletions

View file

@ -69,16 +69,16 @@ coverage data. Return code coverage data and the values returned by THUNK."
;; VM is different from the current one, continuations will not be
;; resumable.
(call-with-values (lambda ()
(let ((level (vm-trace-level vm))
(hook (vm-next-hook vm)))
(let ((level (vm-trace-level))
(hook (vm-next-hook)))
(dynamic-wind
(lambda ()
(set-vm-trace-level! vm (+ level 1))
(set-vm-trace-level! (+ level 1))
(add-hook! hook collect!))
(lambda ()
(call-with-vm vm thunk))
(call-with-vm thunk))
(lambda ()
(set-vm-trace-level! vm level)
(set-vm-trace-level! level)
(remove-hook! hook collect!)))))
(lambda args
(apply values (make-coverage-data ip-counts) args))))