summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-03-14 11:17:08 +0100
committerAndy Wingo <wingo@pobox.com>2016-03-14 11:17:08 +0100
commit43a038f6e12cc4615df3f4fb9e6904bd819a2928 (patch)
tree64c308305ae60fe049507bf7a2378451d8666f51
parentd236022eb0d285af3d462de9e99a212eba459df2 (diff)
downloadguile-43a038f6e12cc4615df3f4fb9e6904bd819a2928.tar.gz
Fix lower-bound saturation in type inference
* module/language/cps/types.scm (type-entry-saturating-union): Fix range saturation in the negative direction. Previously we were artificially truncating negative range ends to zero.
-rw-r--r--module/language/cps/types.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index 4adb8a89e..4cfc71fd6 100644
--- a/module/language/cps/types.scm
+++ b/module/language/cps/types.scm
@@ -288,8 +288,8 @@
(b-min (type-entry-min b)))
(cond
((not (< b-min a-min)) a-min)
- ((> 0 b-min) 0)
- ((> &range-min b-min) &range-min)
+ ((< 0 b-min) 0)
+ ((< &range-min b-min) &range-min)
(else -inf.0)))
(let ((a-max (type-entry-max a))
(b-max (type-entry-max b)))