From d5c361ef3fbeae38fec8c72b63c8f922197f6331 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Wed, 2 Feb 1994 04:01:23 +0000 Subject: [PATCH] Fixed to work with 2-tag fixnums. --- v7/src/compiler/base/utils.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/v7/src/compiler/base/utils.scm b/v7/src/compiler/base/utils.scm index 801ba03ec..9caaa3bc7 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.18 1992/11/14 17:20:17 gjr Exp $ +$Id: utils.scm,v 4.19 1994/02/02 04:01:23 adams Exp $ Copyright (c) 1987-1992 Massachusetts Institute of Technology @@ -197,7 +197,7 @@ MIT in each case. |# ;; Any reason not to use `object/non-pointer?' here? -- cph (or (object-type? (ucode-type false) object) (object-type? (ucode-type true) object) - (object-type? (ucode-type fixnum) object) + (fix:fixnum? object) (object-type? (ucode-type character) object) (object-type? (ucode-type unassigned) object) (object-type? (ucode-type the-environment) object) @@ -362,9 +362,17 @@ MIT in each case. |# (define procedure-object? (lexical-reference system-global-environment 'PROCEDURE?)) +;;!(define (careful-object-datum object) +;;! ;; This works correctly when cross-compiling. +;;! (if (and (object-type? (ucode-type fixnum) object) +;;! (negative? object)) +;;! (+ object unsigned-fixnum/upper-limit) +;;! (object-datum object))) + (define (careful-object-datum object) ;; This works correctly when cross-compiling. - (if (and (object-type? (ucode-type fixnum) object) + (if (and (fix:fixnum? object) (negative? object)) (+ object unsigned-fixnum/upper-limit) - (object-datum object))) \ No newline at end of file + (object-datum object))) + -- 2.25.1