Permalink
Browse files

0.8.13.77.character.26:

	"Once is forgivable: twice is punishable"

	Restore buildability on PPC (Eric Marsden sbcl-devel 2004-09-21)
	... EXTERN-ALIEN-NAME logic;
	... also restore self-buildability from a character_branch
		build: if we're always dumping every kind of string as a
		base-string, we should make the declarations reflect
		that.
  • Loading branch information...
1 parent f842668 commit fcb2e90c03cb3b97f3c73a6da4dd720011974cf0 @csrhodes csrhodes committed Sep 21, 2004
Showing with 35 additions and 25 deletions.
  1. +13 −13 TODO.character
  2. +6 −2 src/compiler/dump.lisp
  3. +1 −1 src/compiler/ppc/c-call.lisp
  4. +14 −8 src/compiler/ppc/vm.lisp
  5. +1 −1 version.lisp-expr
View
@@ -56,8 +56,8 @@ particularly appealing.)
not just (:CONSTANT SIMPLE-BASE-STRING), coercing to base-string
within the VOP implementation. (Rationale: less use of #.(coerce
"foo" 'base-string) throughout the code.)
- -- done for x86;
- -- TODO: ppc, sparc, mips, hppa, alpha.
+ -- done for x86, ppc (Eric Marsden);
+ -- TODO: sparc, mips, hppa, alpha.
** fix GENESIS to use SB!XC:CHAR-CODE always. (Rationale: we should
only use STANDARD-CHARs in our source; this may be hard to achieve,
@@ -80,12 +80,11 @@ decision allows for infrastructural progress). This requires
modification of the various CHAR-UPCASE/STRING-DOWNCASE/GRAPHIC-CHAR-P
etc. functions, and will probably address the failing test FORMAT.C.4A
from gcl/ansi-tests.
- -- done, including a test case for ANSI consistency wrt
- GRAPHIC-CHAR-P and CHAR-NAME. The names of the characters
- between #x80 and #xa0 might want to be revised.
- (the inclusion of the binary data generated from the Unicode
- data files might also be suboptimal in the long run. Many other
- possibilities exist.)
+ -- done (Teemu Kalvas), including a test case for ANSI consistency
+ wrt GRAPHIC-CHAR-P and CHAR-NAME. The names of the characters
+ between #x80 and #xa0 might want to be revised. (the inclusion of
+ the binary data generated from the Unicode data files might also
+ be suboptimal in the long run. Many other possibilities exist.)
** implement :UTF-8, :ISO-8859-1 and :POSIX external formats, and make
:DEFAULT an alias for the approprate one based on nl_langinfo(CODESET)
@@ -95,17 +94,17 @@ Eventually other :ISO-8859-<N> external formats should be supported,
even in 8-bit lisps, but attempts to print characters which are not
representable in those formats should probably error, so it might not
be terribly useful.
- -- :UTF-8 external format partially done (easier than it seemed due
- to a bug rendering FAST-READ-CHAR more-or-less exactly the same
- as READ-CHAR).
+ -- :UTF-8 external format partially done (Teemu Kalvas) (easier than
+ it seemed due to a bug rendering FAST-READ-CHAR more-or-less
+ exactly the same as READ-CHAR).
-- nl_langinfo(CODESET) :DEFAULT processing done.
-- TODO: :ISO-8859-1, aliases
** alter the reader and any similar data structures such that they do
not scale linearly in size with the number of characters in the
system. (Rationale: having a readtable with 2^21 entries would make
even current bloated sbcl.core look tiny.)
- -- done reader, symbol printer, format subsystem.
+ -- done reader, symbol printer (Teemu Kalvas), format subsystem.
(Note that the symbol printer has multiple bugs in its logic
which have not been fixed by this branch.)
@@ -117,7 +116,8 @@ as BASE-STRING, which allows for identical cold fasls and cores to be
generated from lisps with different BASE-CHAR/CHARACTER distinctions.)
-- done: the cross-compiler type system, the cross-compiler dumper
and genesis cooperate to make every host string look like a
- target base-string.
+ target base-string. Including fixing for self-building (Eric
+ Marsden).
-- (Note that dubious uses of CL:TYPE-OF in portions of the
compiler such as CONVERT-MEMBER-TYPE, TWO-ARG-DERIVE-TYPE
remain.)
View
@@ -910,14 +910,18 @@
(dump-byte (char-code ch) file))
(defun dump-base-chars-of-string (s fasl-output)
- (declare (type base-string s) (type fasl-output fasl-output))
+ (declare #+sb-xc-host (type simple-string s)
+ #-sb-xc-host (type simple-base-string s)
+ (type fasl-output fasl-output))
(dovector (c s)
(dump-byte (sb!xc:char-code c) fasl-output))
(values))
+
;;; Dump a SIMPLE-BASE-STRING.
(defun dump-simple-base-string (s file)
- (declare (type simple-base-string s))
+ #+sb-xc-host (declare (type simple-string s))
+ #-sb-xc-host (declare (type simple-base-string s))
(dump-fop* (length s) fop-small-base-string fop-base-string file)
(dump-base-chars-of-string s file)
(values))
@@ -303,7 +303,7 @@
(:translate foreign-symbol-address)
(:policy :fast-safe)
(:args)
- (:arg-types (:constant simple-base-string))
+ (:arg-types (:constant simple-string))
(:info foreign-symbol)
(:results (res :scs (sap-reg)))
(:result-types system-area-pointer)
View
@@ -332,13 +332,19 @@
(immediate-constant "Immed"))))
;;; The loader uses this to convert alien names to the form they
-;;; occur in the symbol table. This is ELF, so do nothing.
+;;; occur in the symbol table.
(defun extern-alien-name (name)
- (declare (type simple-string name))
- (coerce
- ;; Darwin is non-ELF, and needs a _ prefix
- #!+darwin (concatenate 'string "_" name)
- ;; The other (ELF) ports currently don't need any prefix
- #!-darwin name
- 'simple-base-string))
+ (declare (type string name))
+ ;; Darwin is non-ELF, and needs a _ prefix. The other (ELF) ports
+ ;; currently don't need any prefix.
+ (flet ((maybe-prefix (name)
+ #!+darwin (concatenate 'simple-base-string "_" name)
+ #!-darwin name))
+ (typecase name
+ (simple-base-string (maybe-prefix name))
+ (base-string (coerce (maybe-prefix name) 'simple-base-string))
+ (t
+ (handler-case (coerce (maybe-prefix name) 'simple-base-string)
+ (type-error ()
+ (error "invalid external alien name: ~S" name)))))))
View
@@ -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".)
-"0.8.13.77.character.25"
+"0.8.13.77.character.26"

0 comments on commit fcb2e90

Please sign in to comment.