[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/41: frame-call-representation avoids frame-procedure.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/41: frame-call-representation avoids frame-procedure. |
Date: |
Wed, 02 Dec 2015 08:06:47 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 029af6f68ab7bbe02e1cc189c8f99e7e754daf74
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 12:25:26 2015 +0100
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.
---
module/system/vm/frame.scm | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm
index e9dc2ee..4ce4d7f 100644
--- a/module/system/vm/frame.scm
+++ b/module/system/vm/frame.scm
@@ -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)
- [Guile-commits] 02/41: Don't compile equal? to br-if-equal, (continued)
- [Guile-commits] 02/41: Don't compile equal? to br-if-equal, Andy Wingo, 2015/12/02
- [Guile-commits] 04/41: Identify boot continuations by code, not closure, Andy Wingo, 2015/12/02
- [Guile-commits] 01/41: Fix miscompilation of closures allocated as vectors, Andy Wingo, 2015/12/02
- [Guile-commits] 08/41: Add frame-procedure-name, Andy Wingo, 2015/12/02
- [Guile-commits] 06/41: Apply of non-programs has IP that is not from prev frame, Andy Wingo, 2015/12/02
- [Guile-commits] 07/41: Remove primitive?, add primitive-code?, Andy Wingo, 2015/12/02
- [Guile-commits] 10/41: More robust low-level frame printer, Andy Wingo, 2015/12/02
- [Guile-commits] 05/41: All arities serialize a "closure" binding, Andy Wingo, 2015/12/02
- [Guile-commits] 12/41: ,registers doesn't use frame-procedure, Andy Wingo, 2015/12/02
- [Guile-commits] 11/41: Better frame-call-representation printing of GC clobbers, Andy Wingo, 2015/12/02
- [Guile-commits] 09/41: frame-call-representation avoids frame-procedure.,
Andy Wingo <=
- [Guile-commits] 15/41: Remove frame-procedure, Andy Wingo, 2015/12/02
- [Guile-commits] 13/41: Remove `procedure' repl command, Andy Wingo, 2015/12/02
- [Guile-commits] 14/41: VM traps don't match on value of slot 0, Andy Wingo, 2015/12/02
- [Guile-commits] 17/41: Remove frame->module, Andy Wingo, 2015/12/02
- [Guile-commits] 19/41: Add bv-length instruction, Andy Wingo, 2015/12/02
- [Guile-commits] 18/41: Range inference over the full U64+S64 range, Andy Wingo, 2015/12/02
- [Guile-commits] 20/41: bv-f{32, 64}-{ref, set!} take unboxed u64 index, Andy Wingo, 2015/12/02
- [Guile-commits] 23/41: Beginning of u64 phi unboxing, Andy Wingo, 2015/12/02
- [Guile-commits] 16/41: Add low-level support for unboxed 64-bit unsigned ints, Andy Wingo, 2015/12/02
- [Guile-commits] 22/41: Specialize u64 comparisons, Andy Wingo, 2015/12/02