Changeset 5126
- Timestamp:
- Sep 5, 2006, 4:18:59 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/xdump/xfasload.lisp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/xdump/xfasload.lisp
r5056 r5126 63 63 (defparameter *xload-target-fulltag-for-symbols* nil) 64 64 (defparameter *xload-target-fulltag-for-functions* nil) 65 (defparameter *xload-target-char-code-limit* nil) 65 66 66 67 … … 148 149 (if (arch::target-function-tag-is-subtag arch) 149 150 (arch::target-fulltag-misc arch) 150 (arch::target-function-tag arch))))) 151 (arch::target-function-tag arch))) 152 (setq *xload-target-char-code-limit* 153 (arch::target-char-code-limit arch)))) 151 154 152 155 … … 785 788 (let* ((subtag (type-keyword-code :simple-string))) 786 789 (multiple-value-bind (addr v offset) (xload-make-ivector *xload-readonly-space* subtag n) 787 (do* ((p (+ offset *xload-target-misc-data-offset*) 788 (1+ p)) 789 (i 0 (1+ i))) 790 ((= i n) str) 791 (declare (fixnum i p)) 792 (setf (u8-ref v p) (char-code (schar str i)))) 790 (case *xload-target-char-code-limit* 791 (256 (do* ((p (+ offset *xload-target-misc-data-offset*) 792 (1+ p)) 793 (i 0 (1+ i))) 794 ((= i n) str) 795 (declare (fixnum i p)) 796 (setf (u8-ref v p) (char-code (schar str i))))) 797 (t 798 (do* ((p (+ offset *xload-target-misc-data-offset*) 799 (+ p 4)) 800 (i 0 (1+ i))) 801 ((= i n) str) 802 (declare (fixnum i p)) 803 (setf (u32-ref v p) (char-code (schar str i)))))) 793 804 addr))) 794 805 … … 911 922 912 923 (defun xload-get-string (address) 913 (multiple-value-bind (v o) (xload-lookup-address address) 914 (let* ((header (natural-ref v (+ o *xload-target-misc-header-offset*))) 915 (len (ash header (- target::num-subtag-bits))) 916 (str (make-string len)) 917 (p (+ o *xload-target-misc-data-offset*))) 918 (dotimes (i len str) 919 (setf (schar str i) (code-char (u8-ref v (+ p i)))))))) 924 (multiple-value-bind (v o) (xload-lookup-address address) 925 (let* ((header (natural-ref v (+ o *xload-target-misc-header-offset*))) 926 (len (ash header (- target::num-subtag-bits))) 927 (str (make-string len)) 928 (p (+ o *xload-target-misc-data-offset*))) 929 (case *xload-target-char-code-limit* 930 (256 931 (dotimes (i len str) 932 (setf (schar str i) (code-char (u8-ref v (+ p i)))))) 933 (t 934 (dotimes (i len str) 935 (setf (schar str i) (code-char (u32-ref v (+ p (* i 4))))))))))) 920 936 921 937 … … 1111 1127 (multiple-value-bind (str v o) (xload-make-ivector *xload-readonly-space* :simple-string n) 1112 1128 (%epushval s str) 1113 (dotimes (i n) 1114 (setf (u8-ref v (+ o i *xload-target-misc-data-offset*)) 1115 (%fasl-read-count s))) 1129 (case *xload-target-char-code-limit* 1130 (256 1131 (dotimes (i n) 1132 (setf (u8-ref v (+ o i *xload-target-misc-data-offset*)) 1133 (%fasl-read-count s)))) 1134 (t 1135 (dotimes (i n) 1136 (setf (u32-ref v (+ o (* i 4) *xload-target-misc-data-offset*)) 1137 (%fasl-read-count s))))) 1116 1138 str))) 1117 1139 … … 1720 1742 (*xload-target-use-code-vectors* *xload-target-use-code-vectors*) 1721 1743 (*xload-target-fulltag-for-symbols* *xload-target-fulltag-for-symbols*) 1722 (*xload-target-fulltag-for-functions* *xload-target-fulltag-for-functions*)) 1744 (*xload-target-fulltag-for-functions* *xload-target-fulltag-for-functions*) 1745 (*xload-target-char-code-limit* *xload-target-char-code-limit*)) 1723 1746 (setup-xload-target-parameters) 1724 1747 (let* ((*load-verbose* t)
Note:
See TracChangeset
for help on using the changeset viewer.
