summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-02-12 15:57:12 +0100
committerAndy Wingo <wingo@pobox.com>2020-02-12 15:57:12 +0100
commit7dc90a17e03045c7cd8894b14b027b845b68aa4f (patch)
treecfa37f62dcbe843caae9c9be16009d14b457f193
parenta706b7e465f1dee3ef6c95655d8e9f43575ec732 (diff)
downloadguile-7dc90a17e03045c7cd8894b14b027b845b68aa4f.tar.gz
Add type checkers for lsh/immediate and rsh/immediate
* module/language/cps/types.scm (lsh/immediate, rsh/immediate): New type checkers.
-rw-r--r--module/language/cps/types.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index 6447a25e5..88301ba4b 100644
--- a/module/language/cps/types.scm
+++ b/module/language/cps/types.scm
@@ -1,5 +1,5 @@
;;; Type analysis on CPS
-;;; Copyright (C) 2014-2019 Free Software Foundation, Inc.
+;;; Copyright (C) 2014-2020 Free Software Foundation, Inc.
;;;
;;; This library is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU Lesser General Public License as
@@ -1383,6 +1383,7 @@ minimum, and maximum."
(&min/0 count)
(&max/u64 count))))
(define-exact-integer! result min max)))
+(define-simple-type-checker (lsh/immediate &exact-integer))
(define-type-inferrer/param (lsh/immediate count val result)
(restrict! val &exact-integer -inf.0 +inf.0)
(let-values (((min max) (compute-ash-range (&min val)
@@ -1396,6 +1397,7 @@ minimum, and maximum."
(- (&min/0 count))
(- (&max/u64 count)))))
(define-exact-integer! result min max)))
+(define-simple-type-checker (rsh/immediate &exact-integer))
(define-type-inferrer/param (rsh/immediate count val result)
(restrict! val &exact-integer -inf.0 +inf.0)
(let-values (((min max) (compute-ash-range (&min val)