mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-29 08:20:20 +02:00
frame-call-representation avoids frame-procedure.
* module/system/vm/frame.scm (frame-call-representation): Never use frame-procedure, as we don't know that slot 0 is a SCM value and even if it were, we don't know that it corresponds to the procedure being applied, except in the case of primcalls. Print _ as the procedure name if we don't know it, instead of #f.
This commit is contained in:
parent
39090e677e
commit
029af6f68a
1 changed files with 3 additions and 4 deletions
|
@ -364,8 +364,7 @@
|
|||
(define* (frame-call-representation frame #:key top-frame?)
|
||||
(let* ((ip (frame-instruction-pointer frame))
|
||||
(info (find-program-debug-info ip))
|
||||
(nlocals (frame-num-locals frame))
|
||||
(closure (frame-procedure frame)))
|
||||
(nlocals (frame-num-locals frame)))
|
||||
(define (find-slot i bindings)
|
||||
(match bindings
|
||||
(() #f)
|
||||
|
@ -410,7 +409,7 @@
|
|||
(else
|
||||
'())))
|
||||
(cons
|
||||
(frame-procedure-name frame #:info info)
|
||||
(or (frame-procedure-name frame #:info info) '_)
|
||||
(cond
|
||||
((find-program-arity ip)
|
||||
=> (lambda (arity)
|
||||
|
@ -423,7 +422,7 @@
|
|||
(arity-has-rest? arity)
|
||||
1))))
|
||||
((and (primitive-code? ip)
|
||||
(program-arguments-alist closure ip))
|
||||
(program-arguments-alist (frame-local-ref frame 0 'scm) ip))
|
||||
=> (lambda (args)
|
||||
(match args
|
||||
((('required . req)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue