From: Guillermo J. Rozas Date: Sun, 1 Apr 1990 22:28:28 +0000 (+0000) Subject: Substitute constants for expressions computed with `expt'. The expt X-Git-Tag: 20090517-FFI~11476 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=957bd6802cdfe479ad725798eecaedd7a17a5ae4;p=mit-scheme.git Substitute constants for expressions computed with `expt'. The expt constant-folding declaration is currently ignored (because of compile-by-procedures? breaking compiler declarations) and since the values are integrated, they were being computed in a zillion places. --- diff --git a/v7/src/compiler/machines/bobcat/machin.scm b/v7/src/compiler/machines/bobcat/machin.scm index 2eb121748..ccf119fc6 100644 --- a/v7/src/compiler/machines/bobcat/machin.scm +++ b/v7/src/compiler/machines/bobcat/machin.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 4.20 1990/01/18 22:43:44 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/machin.scm,v 4.21 1990/04/01 22:28:28 jinx Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -43,11 +43,18 @@ MIT in each case. |# (define-integrable scheme-object-width 32) (define-integrable scheme-type-width 6) ;or 8 +;; NOTE: expt is not being constant-folded now. +;; For the time being, some of the parameters below are +;; pre-computed and marked with *** +;; There are similar parameters in lapgen.scm +;; Change them if any of the parameters above do. + (define-integrable scheme-datum-width (- scheme-object-width scheme-type-width)) (define-integrable type-scale-factor - (expt 2 (- 8 scheme-type-width))) + ;; (expt 2 (- 8 scheme-type-width)) *** + 4) (define-integrable flonum-size 2) (define-integrable float-alignment 32) @@ -64,9 +71,15 @@ MIT in each case. |# (define-integrable address-units-per-packed-char 1) -(define-integrable signed-fixnum/upper-limit (expt 2 (-1+ scheme-datum-width))) -(define-integrable signed-fixnum/lower-limit (- signed-fixnum/upper-limit)) -(define-integrable unsigned-fixnum/upper-limit (* 2 signed-fixnum/upper-limit)) +(define-integrable signed-fixnum/upper-limit + ;; (expt 2 (-1+ scheme-datum-width)) *** + 33554432) + +(define-integrable signed-fixnum/lower-limit + (- signed-fixnum/upper-limit)) + +(define-integrable unsigned-fixnum/upper-limit + (* 2 signed-fixnum/upper-limit)) (define-integrable (stack->memory-offset offset) offset) (define-integrable ic-block-first-parameter-offset 2)