diff options
author | Andy Wingo <wingo@pobox.com> | 2015-11-27 12:42:53 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-12-01 11:30:54 +0100 |
commit | c960c76fe0dea22728a69923fa8cdaaaa5dc5edd (patch) | |
tree | a526f80edbc0f639433433fc0568bebd68367648 /module | |
parent | 9a8c2995aefcbc39381215f18e2733c6943060e9 (diff) | |
download | guile-c960c76fe0dea22728a69923fa8cdaaaa5dc5edd.tar.gz |
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 _.
Diffstat (limited to 'module')
-rw-r--r-- | 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 4ce4d7f3e..ccfc05745 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) |