From: Taylor R Campbell Date: Thu, 10 Jan 2019 04:01:57 +0000 (+0000) Subject: Disable constant-folding machine-dependent primitives in LIARC. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~54 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=23713958b57766536a37f22507999fb582f6f136;p=mit-scheme.git Disable constant-folding machine-dependent primitives in LIARC. These are not valid across word size changes, but LIARC does not expose compiler:cross-compiling?. --- diff --git a/src/compiler/base/utils.scm b/src/compiler/base/utils.scm index 13c54ed4a..d580de2d8 100644 --- a/src/compiler/base/utils.scm +++ b/src/compiler/base/utils.scm @@ -541,7 +541,11 @@ USA. (define (constant-foldable-primitive? operator) (and (memq operator function-primitives) - (not (and compiler:cross-compiling? + (not (and (or compiler:cross-compiling? + ;; C back end never sets COMPILER:CROSS-COMPILING? + ;; but it has a nonconstant SCHEME-OBJECT-WIDTH + ;; which serves as a proxy. + (not (number? scheme-object-width))) (memq operator machine-dependent-primitives))))) (define-integrable (side-effect-free-primitive? operator)