From ccfcd45888e35bdea4b1c8714edfc0337fedab61 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 24 Sep 2006 23:51:57 +0000 Subject: [PATCH] Fix bug: must use generic arithmetic when comparing SIGNED-FIXNUM/UPPER-LIMIT, since it's an exclusive limit and not usually representable as a fixnum. --- v7/src/compiler/base/utils.scm | 6 +++--- v7/src/compiler/rtlgen/opncod.scm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/v7/src/compiler/base/utils.scm b/v7/src/compiler/base/utils.scm index e2f44dace..3db30862b 100644 --- a/v7/src/compiler/base/utils.scm +++ b/v7/src/compiler/base/utils.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: utils.scm,v 4.31 2006/09/16 11:19:09 gjr Exp $ +$Id: utils.scm,v 4.32 2006/09/24 23:51:57 cph Exp $ Copyright 1986,1987,1988,1989,1990,1992 Massachusetts Institute of Technology Copyright 1994,2001,2001,2003,2004,2006 Massachusetts Institute of Technology @@ -193,8 +193,8 @@ USA. (or (object-type? (ucode-type false) object) (object-type? (ucode-type true) object) (and (fix:fixnum? object) - (fix:< object signed-fixnum/upper-limit) - (not (fix:< object signed-fixnum/lower-limit))) + (>= object signed-fixnum/lower-limit) + (< object signed-fixnum/upper-limit)) (object-type? (ucode-type character) object) (object-type? (ucode-type unassigned) object) (object-type? (ucode-type the-environment) object) diff --git a/v7/src/compiler/rtlgen/opncod.scm b/v7/src/compiler/rtlgen/opncod.scm index e7a126cc2..12c240796 100644 --- a/v7/src/compiler/rtlgen/opncod.scm +++ b/v7/src/compiler/rtlgen/opncod.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: opncod.scm,v 4.74 2006/09/16 11:19:09 gjr Exp $ +$Id: opncod.scm,v 4.75 2006/09/24 23:51:35 cph Exp $ Copyright 1987,1988,1989,1990,1991,1992 Massachusetts Institute of Technology Copyright 1993,1997,1998,2001,2004,2006 Massachusetts Institute of Technology @@ -396,8 +396,8 @@ USA. (if (rtl:constant? expression) (if (let ((value (rtl:constant-value expression))) (and (fix:fixnum? value) - (fix:< value signed-fixnum/upper-limit) - (not (fix:< value signed-fixnum/lower-limit)))) + (>= value signed-fixnum/lower-limit) + (< value signed-fixnum/upper-limit))) (if-true) (if-false)) (if-test -- 2.25.1