~ chicken-core (chicken-5) 018226880008f3898e37a8f3db8ded45f9368133
commit 018226880008f3898e37a8f3db8ded45f9368133
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Mar 31 09:58:57 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu Mar 31 09:58:57 2011 +0200
report when predicate-rewrite takes place
diff --git a/scrutinizer.scm b/scrutinizer.scm
index 6f6c1a4d..df2f244c 100755
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -515,11 +515,21 @@
(##sys#get pn '##compiler#predicate)) =>
(lambda (pt)
(cond ((match-specialization (list pt) (cdr args))
+ (report
+ loc
+ (sprintf
+ "~apredicate is called with an argument of type `~a' and will always return true"
+ (pname) pt))
(specialize-node!
node
`(let ((#:tmp #(1))) '#t))
(set! op (list pn pt)))
((match-specialization (list `(not ,pt)) (cdr args))
+ (report
+ loc
+ (sprintf
+ "~apredicate is called with an argument of type `~a' and will always return false"
+ (pname) (car args)))
(specialize-node!
node
`(let ((#:tmp #(1))) '#f))
Trap