>From 3e66425b56210468b01708bdbd009d1849fbf4e6 Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Mon, 15 Feb 2016 22:15:42 +1300 Subject: [PATCH 3/4] 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"). --- scrutinizer.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scrutinizer.scm b/scrutinizer.scm index 5be5aa7..301485c 100644 --- a/scrutinizer.scm +++ b/scrutinizer.scm @@ -369,6 +369,7 @@ (specialize-node! node (cdr args) `(let ((#(tmp) #(1))) '#t)) + (set! r '(true)) (set! op (list pn pt)))) ((begin (trail-restore trail0 typeenv) @@ -382,6 +383,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)) => -- 2.7.0.rc3