Fix portable-fixnum?.

original commit: 7808be5e20c022799d16d3a7044dc1e17dd04898
This commit is contained in:
Vincent St-Amour 2011-01-12 09:58:10 -05:00
commit 9f19fceabb
2 changed files with 6 additions and 6 deletions

View File

@ -148,10 +148,10 @@
(tc-e/t 3 -PositiveFixnum)
(tc-e/t 100 -PositiveFixnum)
(tc-e/t -100 -NegativeFixnum)
(tc-e/t 2147483647 -PositiveFixnum)
(tc-e/t -2147483647 -NegativeFixnum)
(tc-e/t 2147483648 -Pos)
(tc-e/t -2147483648 -Integer)
(tc-e/t 1073741823 -PositiveFixnum)
(tc-e/t -1073741824 -NegativeFixnum)
(tc-e/t 1073741824 -Pos)
(tc-e/t -1073741825 -Integer)
(tc-e/t "foo" -String)
(tc-e (+ 3 4) -Pos)
[tc-e/t (lambda: () 3) (t:-> -PositiveFixnum : -true-lfilter)]

View File

@ -27,8 +27,8 @@
;; `fixnum?' to avoid creating platform-dependent .zo files.
(define (portable-fixnum? n)
(and (exact-integer? n)
(< n (expt 2 31))
(> n (- (expt 2 31)))))
(< n (expt 2 30))
(>= n (- (expt 2 30)))))
;; return the type of a literal value
;; scheme-value -> type