wingo pushed a commit to branch master
in repository guile.
commit c960c76fe0dea22728a69923fa8cdaaaa5dc5edd
Author: Andy Wingo <[email protected]>
Date: Fri Nov 27 12:42:53 2015 +0100
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 _.
---
module/system/vm/frame.scm | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm
index 4ce4d7f..ccfc057 100644
--- a/module/system/vm/frame.scm
+++ b/module/system/vm/frame.scm
@@ -380,8 +380,17 @@
(frame-local-ref frame i 'scm))
((find-slot i bindings)
=> (lambda (binding)
- (frame-local-ref frame (binding-slot binding)
- (binding-representation binding))))
+ (let ((val (frame-local-ref frame (binding-slot 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
'_)))
(define (application-arguments)