mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Fix trap handlers to handle applicable structs.
Reported by Jordy Dickinson <jordy.dickinson@gmail.com>. Fixes <http://bugs.gnu.org/15691>. * module/system/vm/traps.scm (frame-matcher): Extract procedure when proc is an applicable struct.
This commit is contained in:
parent
793e8a9317
commit
306cc01d39
1 changed files with 12 additions and 9 deletions
|
@ -109,15 +109,18 @@
|
|||
((new-disabled-trap vm enable disable) frame))
|
||||
|
||||
(define (frame-matcher proc match-objcode?)
|
||||
(if match-objcode?
|
||||
(lambda (frame)
|
||||
(let ((frame-proc (frame-procedure frame)))
|
||||
(or (eq? frame-proc proc)
|
||||
(and (program? frame-proc)
|
||||
(eq? (program-objcode frame-proc)
|
||||
(program-objcode proc))))))
|
||||
(lambda (frame)
|
||||
(eq? (frame-procedure frame) proc))))
|
||||
(let ((proc (if (struct? proc)
|
||||
(procedure proc)
|
||||
proc)))
|
||||
(if match-objcode?
|
||||
(lambda (frame)
|
||||
(let ((frame-proc (frame-procedure frame)))
|
||||
(or (eq? frame-proc proc)
|
||||
(and (program? frame-proc)
|
||||
(eq? (program-objcode frame-proc)
|
||||
(program-objcode proc))))))
|
||||
(lambda (frame)
|
||||
(eq? (frame-procedure frame) proc)))))
|
||||
|
||||
;; A basic trap, fires when a procedure is called.
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue