Procedure fixnum-constant didn't realize that maximum-positive-fixnum is one
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 28 Jun 1988 20:53:49 +0000 (20:53 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 28 Jun 1988 20:53:49 +0000 (20:53 +0000)
less than the absolute value of the least (negative) fixnum.

v7/src/compiler/machines/bobcat/lapgen.scm

index 9cf55f1c11a8938d4ed259db87c49aa31c7200f4..0403ec6a04358785af04fd2085a9d374f5323d6e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 4.9 1988/06/14 08:47:38 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/lapgen.scm,v 4.10 1988/06/28 20:53:49 arthur Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -350,9 +350,9 @@ MIT in each case. |#
       (INST (MOV B (& ,type-code) ,effective-address))))
 
 (define (fixnum-constant x)
-  (if (<= (abs x) maximum-positive-fixnum)
-      x
-      (error "Not a fixnum" x)))
+  (cond ((<= x maximum-positive-fixnum) x)
+       ((>= x (- (1+ maximum-positive-fixnum))) x)
+       (else (error "Not a fixnum" x))))
 
 (define (fixnum-expression? expression)
   ;; input: an rtl expression