projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.9.13.36: global policy / null-lexenv confusion fix
[sbcl.git]
/
src
/
code
/
octets.lisp
diff --git
a/src/code/octets.lisp
b/src/code/octets.lisp
index
751a039
..
b86a1be
100644
(file)
--- a/
src/code/octets.lisp
+++ b/
src/code/octets.lisp
@@
-174,7
+174,7
@@
one-past-the-end"
(defmacro define-unibyte-mapper (byte-char-name code-byte-name &rest exceptions)
`(progn
(defmacro define-unibyte-mapper (byte-char-name code-byte-name &rest exceptions)
`(progn
- (declaim (inline ,byte-char-name ,code-byte-name))
+ (declaim (inline ,byte-char-name))
(defun ,byte-char-name (byte)
(declare (optimize speed (safety 0))
(type (unsigned-byte 8) byte))
(defun ,byte-char-name (byte)
(declare (optimize speed (safety 0))
(type (unsigned-byte 8) byte))
@@
-186,9
+186,16
@@
one-past-the-end"
exception
byte))))
byte))
exception
byte))))
byte))
+ ;; This used to be inlined, but it caused huge slowdowns in SBCL builds,
+ ;; bloated the core by about 700k on x86-64. Removing the inlining
+ ;; didn't seem to have any performance effect. -- JES, 2005-10-15
(defun ,code-byte-name (code)
(declare (optimize speed (safety 0))
(type char-code code))
(defun ,code-byte-name (code)
(declare (optimize speed (safety 0))
(type char-code code))
+ ;; FIXME: I'm not convinced doing this with CASE is a good idea as
+ ;; long as it's just macroexpanded into a stupid COND. Consider
+ ;; for example the output of (DISASSEMBLE 'SB-IMPL::CODE->CP1250-MAPPER)
+ ;; -- JES, 2005-10-15
(case code
,@(mapcar (lambda (exception)
(destructuring-bind (byte code) exception
(case code
,@(mapcar (lambda (exception)
(destructuring-bind (byte code) exception
@@
-214,6
+221,7
@@
one-past-the-end"
(defun get-latin-bytes (mapper external-format string pos end)
(declare (ignore end))
(let ((code (funcall mapper (char-code (char string pos)))))
(defun get-latin-bytes (mapper external-format string pos end)
(declare (ignore end))
(let ((code (funcall mapper (char-code (char string pos)))))
+ (declare (type (or null char-code) code))
(values (cond
((and code (< code 256)) code)
(t
(values (cond
((and code (< code 256)) code)
(t
@@
-633,13
+641,16
@@
one-past-the-end"
(defun default-external-format ()
(or *default-external-format*
(defun default-external-format ()
(or *default-external-format*
- (let ((external-format (intern (or (sb!alien:alien-funcall
- (extern-alien
- "nl_langinfo"
- (function c-string int))
- sb!unix:codeset)
- "LATIN-1")
- "KEYWORD")))
+ (let ((external-format #!-win32 (intern (or (sb!alien:alien-funcall
+ (extern-alien
+ "nl_langinfo"
+ (function c-string int))
+ sb!unix:codeset)
+ "LATIN-1")
+ "KEYWORD")
+ #!+win32
+ #!+sb-unicode (sb!win32::ansi-codepage)
+ #!-sb-unicode :LATIN-1))
(/show0 "cold-printing defaulted external-format:")
#!+sb-show
(cold-print external-format)
(/show0 "cold-printing defaulted external-format:")
#!+sb-show
(cold-print external-format)