From: <me...@ho...> - 2005-12-29 10:59:55
|
Paul Dietz <paul.f.dietz <at> motorola.com> writes:=20 > * (make-symbol (make-array '(1) :element-type 'character :adjustable=20 > t :initial-contents "X")) =20 > =20 > debugger invoked on a TYPE-ERROR: The value "X" is not of type > SIMPLE-STRING. =20 > =20 > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.=20 > =20 > restarts (invokable by number or by possibly-abbreviated name):=20 > 0: [ABORT] Exit debugger, returning to top level.=20 > =20 > This is causing many failures in the ansi-tests random-type-prop > tests. =20 > =20 > Paul=20 =20 Modifying print.lisp to work with strings instead of simple-strings=20 slowed FPRINT-PRETTY and FPRINT-UGLY 70% and 20% so I suggest we live=20 with our ANSI given right to copy the string:=20 =20 Index: src/code/symbol.lisp=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 RCS file: /cvsroot/sbcl/sbcl/src/code/symbol.lisp,v=20 retrieving revision 1.21=20 diff -u -p -r1.21 symbol.lisp=20 =2D-- src/code/symbol.lisp 9 Aug 2005 13:57:49 -0000 1.21=20 +++ src/code/symbol.lisp 28 Dec 2005 16:07:47 -0000=20 @@ -88,7 +88,9 @@=20 (defun make-symbol (string)=20 #!+sb-doc=20 "Make and return a new symbol with the STRING as its print name."=20 =2D (make-symbol string))=20 + (make-symbol (if (simple-string-p string)=20 + string=20 + (subseq string 0))))=20 =20 (defun get (symbol indicator &optional (default nil))=20 #!+sb-doc=20 =20 G=E1bor=20 |
From: <me...@ho...> - 2005-12-30 14:00:37
Attachments:
make-symbol.patch
|
Patch for review. * rename MAKE-SYMBOL to %MAKE-SYMBOL * add MAKE-SYMBOL that calls %MAKE-SYMBOL and copies the string if it is=20 not simple * add DEFTRANSFORM on MAKE-SYMBOL with SIMPLE-STRING argument =2D Is there a better place for the DEFTRANSFORM? G=E1bor |
From: <me...@ho...> - 2006-01-05 20:51:18
|
On Friday 30 December 2005 14:58, G=C3=A1bor Melis wrote: > Patch for review. > > * rename MAKE-SYMBOL to %MAKE-SYMBOL > * add MAKE-SYMBOL that calls %MAKE-SYMBOL and copies the string if it > is not simple > * add DEFTRANSFORM on MAKE-SYMBOL with SIMPLE-STRING argument > > - Is there a better place for the DEFTRANSFORM? Committed as 0.9.8.10 and 11. > G=C3=A1bor |
From: Paul F. D. <di...@dl...> - 2005-12-29 13:45:26
|
Gábor Melis wrote: > Modifying print.lisp to work with strings instead of simple-strings > slowed FPRINT-PRETTY and FPRINT-UGLY 70% and 20% so I suggest we live > with our ANSI given right to copy the string: Yes, no sense optimizing the weird case. Paul |