From 360bfcf8c91635f390dad7139dac4b7138cfa9b7 Mon Sep 17 00:00:00 2001 From: Richard M Kreuter Date: Wed, 3 Sep 2008 18:59:52 +0000 Subject: [PATCH] 1.0.20.1: Dump characters ofnon-base-strings names in 32-bit quantities --- src/code/fop.lisp | 17 +++++++++-------- src/compiler/target-dump.lisp | 2 +- version.lisp-expr | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/code/fop.lisp b/src/code/fop.lisp index fd01949..655b6e9 100644 --- a/src/code/fop.lisp +++ b/src/code/fop.lisp @@ -78,7 +78,8 @@ ;;; with an automatic conversion from (UNSIGNED-BYTE 8) into CHARACTER ;;; for each element read (declaim (ftype (function (stream simple-string &optional index) (values)) - read-string-as-bytes #!+sb-unicode read-string-as-words)) + read-string-as-bytes + #!+sb-unicode read-string-as-unsigned-byte-32)) (defun read-string-as-bytes (stream string &optional (length (length string))) (dotimes (i length) (setf (aref string i) @@ -91,13 +92,13 @@ ;; it as an alternate definition, protected with #-SB-XC-HOST. (values)) #!+sb-unicode -(defun read-string-as-words (stream string &optional (length (length string))) - #+sb-xc-host (bug "READ-STRING-AS-WORDS called") +(defun read-string-as-unsigned-byte-32 + (stream string &optional (length (length string))) + #+sb-xc-host (bug "READ-STRING-AS-UNSIGNED-BYTE-32 called") (dotimes (i length) (setf (aref string i) (let ((code 0)) - ;; FIXME: is this the same as READ-WORD-ARG? - (dotimes (k sb!vm:n-word-bytes (sb!xc:code-char code)) + (dotimes (k 4 (sb!xc:code-char code)) (setf code (logior code (ash (read-byte stream) (* k sb!vm:n-byte-bits)))))))) (values)) @@ -210,7 +211,7 @@ ,n-buffer ,n-size) #-sb-xc-host - (#!+sb-unicode read-string-as-words + (#!+sb-unicode read-string-as-unsigned-byte-32 #!-sb-unicode read-string-as-bytes *fasl-input-stream* ,n-buffer @@ -264,7 +265,7 @@ #!-sb-unicode (read-string-as-bytes *fasl-input-stream* res) #!+sb-unicode - (read-string-as-words *fasl-input-stream* res) + (read-string-as-unsigned-byte-32 *fasl-input-stream* res) (push-fop-table (make-symbol res)))) (define-fop (fop-package 14) @@ -392,7 +393,7 @@ (define-cloned-fops (fop-character-string 161) (fop-small-character-string 162) (let* ((arg (clone-arg)) (res (make-string arg))) - (read-string-as-words *fasl-input-stream* res) + (read-string-as-unsigned-byte-32 *fasl-input-stream* res) res))) (define-cloned-fops (fop-vector 39) (fop-small-vector 40) diff --git a/src/compiler/target-dump.lisp b/src/compiler/target-dump.lisp index 8b4f583..038c645 100644 --- a/src/compiler/target-dump.lisp +++ b/src/compiler/target-dump.lisp @@ -20,7 +20,7 @@ (defun dump-characters-of-string (s fasl-output) (declare (type string s) (type fasl-output fasl-output)) (dovector (c s) - (dump-word (char-code c) fasl-output)) + (dump-unsigned-byte-32 (char-code c) fasl-output)) (values)) #!+sb-unicode (defun dump-simple-character-string (s file) diff --git a/version.lisp-expr b/version.lisp-expr index b943c9c..3bc6f6f 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.20" +"1.0.20.1" -- 1.7.10.4