~ chicken-core (chicken-5) 87aa34277b410713707bd8d819b9090b5a4831fe
commit 87aa34277b410713707bd8d819b9090b5a4831fe Author: Evan Hanson <evhan@foldling.org> AuthorDate: Mon Feb 15 22:15:42 2016 +1300 Commit: Peter Bex <peter@more-magic.net> CommitDate: Sat Jun 18 16:43:46 2016 +0200 Propagate known predicate call result types Previously, predicate calls would specialize but not communicate the true or false result type to the caller, who would re-walk the node but still use the original, more general type (probably "boolean"). Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/scrutinizer.scm b/scrutinizer.scm index 65250104..faaa9d80 100644 --- a/scrutinizer.scm +++ b/scrutinizer.scm @@ -377,6 +377,7 @@ (specialize-node! node (cdr args) `(let ((#(tmp) #(1))) '#t)) + (set! r '(true)) (set! op (list pn pt)))) ((begin (trail-restore trail0 typeenv) @@ -390,6 +391,7 @@ (specialize-node! node (cdr args) `(let ((#(tmp) #(1))) '#f)) + (set! r '(false)) (set! op (list pt `(not ,pt))))) (else (trail-restore trail0 typeenv))))) ((and specialize (get-specializations pn)) =>Trap