From: Chris Hanson Date: Tue, 16 Feb 2010 00:09:14 +0000 (-0800) Subject: Don't fix constant at compile time; breaks liarc build. X-Git-Tag: 20100708-Gtk~126^2~21 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=112af512f659e06e214c9512a280502be23ecfa0;p=mit-scheme.git Don't fix constant at compile time; breaks liarc build. --- diff --git a/src/runtime/string.scm b/src/runtime/string.scm index 7bb4e664b..7b30f6e26 100644 --- a/src/runtime/string.scm +++ b/src/runtime/string.scm @@ -183,21 +183,18 @@ USA. (define (string-maximum-length string) (guarantee-string string 'STRING-MAXIMUM-LENGTH) (fix:- (fix:lsh (fix:- (system-vector-length string) 1) - (fix:- 0 %octets->words-shift)) + %words->octets-shift) 1)) -(define-integrable %octets->words-shift - ((sc-macro-transformer - (lambda (form environment) - form environment - ;; This is written as a macro so that the shift will be a - ;; constant in the compiled code. It does not work when - ;; cross-compiled! - (let ((chars-per-word (vector-ref (gc-space-status) 0))) - (case chars-per-word - ((4) -2) - ((8) -3) - (else (error "Can't support this word size:" chars-per-word)))))))) +(define %octets->words-shift + (let ((chars-per-word (vector-ref (gc-space-status) 0))) + (case chars-per-word + ((4) -2) + ((8) -3) + (else (error "Can't support this word size:" chars-per-word))))) + +(define %words->octets-shift + (- %octets->words-shift)) (define (string . objects) (%string-append (map ->string objects)))