mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
Refactorings to apply-hook and push-continuation-hook
* libguile/vm-engine.c (vm_engine): Always invoke the apply hook after the ip has been reset. Avoids problems in frame-bindings, which builds its bindings map based on the IP. Invoke push-continuation before linking the new frame, so that more locals are available to the frame inspector. * module/system/vm/traps.scm (trap-in-procedure): No need for a push-cont handler, as the apply handler will exit the frame.
This commit is contained in:
parent
7c080187bc
commit
f5cb70e94a
2 changed files with 28 additions and 20 deletions
|
@ -186,10 +186,6 @@
|
|||
(if (our-frame? frame)
|
||||
(enter-proc frame)))
|
||||
|
||||
(define (push-cont-hook frame)
|
||||
(if in-proc?
|
||||
(exit-proc frame)))
|
||||
|
||||
(define (pop-cont-hook frame . values)
|
||||
(if in-proc?
|
||||
(exit-proc frame))
|
||||
|
@ -206,7 +202,6 @@
|
|||
current-frame
|
||||
(lambda (frame)
|
||||
(add-hook! (vm-apply-hook) apply-hook)
|
||||
(add-hook! (vm-push-continuation-hook) push-cont-hook)
|
||||
(add-hook! (vm-pop-continuation-hook) pop-cont-hook)
|
||||
(add-hook! (vm-abort-continuation-hook) abort-hook)
|
||||
(if (and frame (our-frame? frame))
|
||||
|
@ -215,7 +210,6 @@
|
|||
(if in-proc?
|
||||
(exit-proc frame))
|
||||
(remove-hook! (vm-apply-hook) apply-hook)
|
||||
(remove-hook! (vm-push-continuation-hook) push-cont-hook)
|
||||
(remove-hook! (vm-pop-continuation-hook) pop-cont-hook)
|
||||
(remove-hook! (vm-abort-continuation-hook) abort-hook)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue