1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00

Better frame-call-representation printing of GC clobbers

* module/system/vm/frame.scm (frame-call-representation): Assume that
  unspecified values are GC clobbers rather than actual arguments, and
  print as _.
This commit is contained in:
Andy Wingo 2015-11-27 12:42:53 +01:00
parent 9a8c2995ae
commit c960c76fe0

View file

@ -380,8 +380,17 @@
(frame-local-ref frame i 'scm)) (frame-local-ref frame i 'scm))
((find-slot i bindings) ((find-slot i bindings)
=> (lambda (binding) => (lambda (binding)
(frame-local-ref frame (binding-slot binding) (let ((val (frame-local-ref frame (binding-slot binding)
(binding-representation binding)))) (binding-representation binding))))
;; It could be that there's a value that isn't clobbered
;; by a call but that isn't live after a call either. In
;; that case, if GC runs during the call, the value will
;; be collected, and on the stack it will be replaced
;; with the unspecified value. Assume that clobbering
;; values is more likely than passing the unspecified
;; value as an argument, and replace unspecified with _,
;; as if the binding were not available.
(if (unspecified? val) '_ val))))
(else (else
'_))) '_)))
(define (application-arguments) (define (application-arguments)