1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +02:00

Convert "ash" to "lsh"/"rsh" when lowering to CPS

* module/language/cps/effects-analysis.scm: Remove case for "ash".
* module/language/cps/types.scm (ash): Remove.
* module/language/tree-il/compile-cps.scm (convert, canonicalize):
  Convert "ash" to "lsh"/"rsh" early on.
* module/system/base/target.scm (target-fixnum?): New procedure.
This commit is contained in:
Andy Wingo 2017-11-11 21:10:28 +01:00
parent a268c02fa0
commit b331ea3193
4 changed files with 52 additions and 15 deletions

View file

@ -33,7 +33,8 @@
target-max-vector-length
target-most-negative-fixnum
target-most-positive-fixnum))
target-most-positive-fixnum
target-fixnum?))
@ -179,3 +180,9 @@ target platform."
"Return the most positive integer representable as a fixnum on the
target platform."
(1- (ash 1 (- (* (target-word-size) 8) 3))))
(define (target-fixnum? n)
(and (exact-integer? n)
(<= (target-most-negative-fixnum)
n
(target-most-positive-fixnum))))