Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
Micro optimization: In SET-CMT-ENTRY, if the char-code is above attribute-table-limit and if the newvalue is #'read-token, we don't actually add the entry to the character-macro-hash-table, because that is the default value for the hash-table. This helps to keep the hash-table size small.
Change uses of _"foo" to (intl:gettext "foo"). This is because slime may get confused with source locations if the reader macros are installed.
Remove _N"" reader macro from docstrings when possible.
Merge intl-branch 2010-03-18 to HEAD. To build, you need to use boot-2010-02-1 as the bootstrap file. You should probably also use the new -P option for build.sh to generate and update the po files while building.
Restart internalization work. This new branch starts with code from the intl-branch on date 2010-02-12 18:00:00+0500. This version works and LANG=en@piglatin bin/lisp works (once the piglatin translation is added).
Mark translatable strings; update cmucl.pot and ko/cmucl.po accordingly.
Add (intl:textdomain "cmucl") to the files to set the textdomain.
GET-MACRO-CHARACTER was using the wrong readtable when figuring out the second return value; it always used *READTABLE* instead of the given readtable.
Merge Unicode work to trunk. From label unicode-utf16-extfmt-2009-06-11.
The character-attribute-hash-table and character-macro-hash-table are only for unicode, so conditionalize it to unicode.
o FLUSH-WHITESPACE was directly accessing the attribute table. This doesn't work with unicode so use the TEST-ATTRIBUTE macro instead, which handles unicode. o The macros CHAR-CLASS, CHAR-CLASS2, and CHAR-CLASS3 were using the attribute table vector directly. We can't do that with unicode, so pass in the readtable itself and use GET-CAT-ENTRY to get the desired information from the readtable. o Update READ-TOKEN to use the new CHAR-CLASS* macros with the readtable instead of the attribute-table vector. These changes allow us to read non-ASCII symbols again.
Oops. Forgot to return the copy in COPY-CHAR-DISPATCH-TABLE.
Reduce the size of the dispatch-table in the readtable. Previously, we used a huge array of 65536 elements. Now use a structure containing a 256-element vector and a hash-table. o Define a new structure (for unicode) for the dispatch table, as described above. o Abstract out the access to the dispatch table by adding the functions GET-DISPATCH-CHAR, SET-DISPATCH-CHAR, and COPY-CHAR-DISPATCH-TABLE. o Use the new functions to access the dispatch table. (The non-unicode stuff is implemented, but currently untested as of this checkin.) Simple tests using ansi-tests from gcl indicate that dispatch-table had a fairly large impact on the speed of the tests. This change, combined with the previous change for the character attribute and macro tables makes the ansi-tests run somewhat slower than before instead of 5-10 times slower.
Merge reader.lisp from unicode-utf16 branch to get smaller readtables.
Reduce the size of readtable by shrinking the size of character-attribute-table and character-macro-table from char-code-limit to 256. Then add two corresponding hash tables to handle the characters with codes above 256. Adjust get/set-cat-entry and get/set-cmt-entry to handle this situation. Try to choose appropriate defaults if the hash-table doesn't have the character we're looking for. Update copy-readtable to handle the hash tables.
The previous change to init-std-lips-readtable to initialize the character-attribute-table doesn't work during cross-compile. Not sure why, but fix it by adding :unicode-bootstrap feature to use the old value during cross-compile. :unicode-bootstrap should NOT be set when doing a normal build. bootfiles/19e/boot-2008-05-cross-unicode-common.lisp: o Add :unicode-bootstrap feature for cross-compile. code/reader.lisp: o Rearrange code slightly. o Use unicode-bootstrap feature to figure out how man entries to initialize. For bootstrap, we want to use the original value of 256.
Initialize all of the character-attribute-table, not just the first 256 entries
Make the reader faster when reading #1= constructs when there are lots of them. Use hash tables instead of an alists for holding and constructing the necessary objects. This can vastly speed up the reader in some cases. But unfortunately it slows down the reader when the circular structure is "small". Some care has been taken not to make the reader slow when there are now #= constructs. This is based on a patch from Jared Davis. reader.lisp: o Add the new hash tables and initialize them appropriately. sharpm.lisp: o Update #= and ## macros to use the new hash tables.
This large checkin merges the double-double float support to HEAD. The merge is from the tag "double-double-irrat-end". The double-double branch is now obsolete. The code should build without double-double support (tested on sparc) as well as build with double-double support (tested also on sparc).
Add basic support for reading and printing double-double-floats. I think this needs to be built from a binary that already has basic double-double support. That is, you need to compile these changes with a binary built from the double-double-branch. (It may work to cross-compile this from the 2006-06 snapshot, but I did not try it.) Reading double-double-floats appears to work. PRINT appears to work. However, formatted output of double-double-floats may not be accurate because SCALE-EXPONENT still only supports double-floats. code/bignum.lisp: o Add support for coercing a BIGNUM to a DOUBLE-DOUBLE-FLOAT. code/float.lisp: o Add support for converting a RATIO to a DOUBLE-DOUBLE-FLOAT. This is needed to be able to read a double-double-float correctly. o INTEGER-DECODE-DOUBLE-DOUBLE-FLOAT seems to be buggy. Use a new version that works but probably conses more than is necessary and is probably slower than necessary. This is needed to print out DOUBLE-DOUBLE-FLOATs correctly. o Add DECODE-DOUBLE-DOUBLE-FLOAT while we're at it. o Add SCALE-DOUBLE-DOUBLE-FLOAT. This is also needed for printing. o Disable %DOUBLE-DOUBLE-FLOAT. There's already an implementation in float-tran. (We really should move the float-tran version to here.) code/format.lisp: o Tell printer to use #\w when printing double-double-floats. code/irrat.lisp: o The deftransform for ABS is working, so use that instead of the hack. code/numbers.lisp: o Update FLOAT-CONTAGION to support mixing rationals with double-double-floats. code/print.lisp: o Recognize double-double-floats for printing. Use "w" as the exponent marker for double-double floats. o Very minor change to FLONUM-TO-DIGITS to support double-double-floats. code/reader.lisp: o Tell the reader that #\w and #\W are exponent markers for double-double-float numbers by giving them the secondary attribute constituent-expt. o Tell the reader to creat double-double-floats when reading such numbers.
Fix properties of #\|. It is a multiple-escape character, but its constituent trait is alphabetic, not multiple-escape. This fixes ansi test SET-SYNTAX-FROM-CHAR-TRAIT-X-#\|.
Fix up some more Ansi test failures with SET-SYNTAX-FROM-CHAR. This fixes SET-SYNTAX-FROM-CHAR.SINGLE-ESCAPE.1, SET-SYNTAX-FROM-CHAR.MULTIPLE-ESCAPE, SET-SYNTAX-FROM-CHAR.SHARP.1, SET-SYNTAX-FROM-CHAR.SHARP.2. o Fix up CHAR-CLASS, CHAR-CLASS2, and CHAR-CLASS3 to return the correct class. Based on SBCL. o SET-SYNTAX-FROM-CHAR shouldn't set the attribute from the secondary attribute. (I think.)
The CLHS entry for SET-SYNTAX-FROM-CHAR is also supposed to copy the entire dispatch table of reader macro functions if the from-char is a dispatching macro character. Make it so.
Merge code from main branch of 2005-12-17 to ppc gencgc branch. Still doesn't work of course.
CLHS 18.104.22.168 says if " token with the syntax of a number cannot be converted to an internal number, an error of type reader-error is signaled." So, disable underflow traps, convert the number. If the resulting float is zero, but the number was not, signal a reader-error.
Merge snapshot-2005-05 to this branch.
Don't signal a reader-error when *read-suppress* is true when reading a list.
o Signal a reader-error if a float can't be represented. o Remove some unused code.
Signal a reader-error condition if a ratio cannot be represented. For example 1/0. See CLHS 22.214.171.124.
MAKE-DISPATCH-MACRO-CHARACTER is supposed to return T, not some non-NIL object. Fixes the MAKE-DISPATCH-MACRO-CHARACTER ansi-tests.
Add an invalid trait for constituent characters and apply them to the characters as specified by CLHS 126.96.36.199. This fixes most of the set-syntax-from-char-trait-x-<foo> tests in the ansi-tests.
The second value from READ-FROM-STRING was wrong when the string was a displaced string. From ansi-tests, read-from-string tests.
ANSI CL says when "*read-suppress* is true, read, read-preserving-whitespace, read-delimited-list, and read-from-string all return a primary value of nil. Make it so. We were returning a list of NILs previously.
The default value of EOF-ERROR-P arg for READ-FROM-STRING is supposed to be T. Make it so. Bug reported by Bruno Haible, cmucl-imp, 2004-10-22.
Implement a much faster and much less consy bignum printer and a faster bignum reader. Contributed by Mark Wooding on cmucl-imp, May 24, 2004.
Fix typo in READ-TOKEN. We want stream::%read-char for simple-streams!
Oops. Remove unused code. Add a couple of comments.
o Fix the float printer to print correctly: (float -54965272/1000000000000000000) was printing as -5.496527e-11 but should be -5.4965272e-11 o Fix the float reader to read correctly, without roundoff: 4.0058643e+8 was incorrectly read as 12518325, 1 (integer-decode-float results). It should be 12518326,1. o Fix the float reader to read floats correctly with unusual values of *read-base*: (let ((*read-base* 2)) (read-from-string "-4.3e+7")) used to return a symbol instead of a float. This changes ported from SBCL.
Per the parse-integer VOTE, revert parse-integer :junk-allowed behavior back to the old way where the parse is terminated as soon as possible, treating trailing whitespace as terminating characters.
(in-package :cl-user) (require :gray-streams) (defclass my-in-stream (ext:fundamental-character-input-stream) ((last-char :initarg :last-char))) (let ((string " a ") (i 0)) (defmethod ext:stream-read-char ((s my-in-stream)) (with-input-from-string (s "b") (read s)) (with-slots (last-char) s (cond (last-char (prog1 last-char (setf last-char nil))) (t (prog1 (aref string i) (setq i (mod (1+ i) (length string))))))))) (defmethod ext:stream-unread-char ((s my-in-stream) char) (setf (slot-value s 'last-char) char) nil) (setq x (make-instance 'my-in-stream :last-char nil)) (read x) => b, instead of a * src/code/reader.lisp: Use a new read buffer for each call to read or read-preserving-whitespace, instead of using one global buffer. From Helmut Eller.
* src/code/reader.lisp (parse-integer): Handle displaced strings.
(parse-integer " 1 ") => 0, 2 instead of 0, 3. Found by Paul Dietz. * src/code/reader.lisp (parse-integer): Rewritten.
Arguments of a READER-ERROR were being passed incorrectly to the compiler notification function.
From Paul Foley: Non-simple-streams-related changes: * Stop commands which go through invoke-command-interactive from affecting the history variables. * Fix some typos in comments * When the GC closes a lost stream, revert to original contents * Replace #+nil with #+(or) in unix*.lisp [NIL is a potentially valid feature name] Simple-streams-related changes: * Teach reader to handle simple-streams * Add missing package prefixes in OPEN * Add unix:unix-msync for force-output on mmapped files * Add placeholder documentation * Numerous changes in simple-streams implementation * Add "external-formats" directory for external formats Note: :BIG-ENDIAN or :LITTLE-ENDIAN should be put on *features*
* src/code/reader.lisp (read-token): Fix last change.
* src/code/reader.lisp (read-token): Fix last change. * src/code/package.lisp (relative-package-name-to-package): Handle the case of an empty name.
Remove the "" nickname of the KEYWORD package, as per ANSI. Found by Paul Dietz. * src/bootfiles/18e/boot13.lisp: New file. * src/code/reader.lisp (read-token) <RETURN-SYMBOL>: If the package name is "", use *keyword-package*.
Change to the compiler's error/note reporting: - an extra optional argument to COMPILER-NOTIFICATION makes it possible to pass text describing the error/note to *COMPILER-NOTIFICATION-FUNCTION*. - functions for *COMPILER-NOTIFICATION-FUNCTION* have an extra second argument which describes the error/note - modify the eval-server functionality in Hemlock in consequence This backwards-incompatible change makes the *COMPILER-NOTIFICATION-FUNCTION* facility considerably more useful, since the description of the error (which was previously not passed to the notification-function) is very useful when reporting an error. Compile-time effect of DEFCONSTANT: instead of discarding the documentation string, add it to the info database.
From Eric Marsden: The attached patch contains mostly trivial changes, including a few spelling corrections, plus changes to the types of condition raised in various cases. The only significant change, I believe, is - MAKE-DISPATCH-MACRO-CHARACTER no longer raises an error if the character already was defined to be a macro character; it overrides the previous definition (as per a suggestion from Drew McDermott on cmucl-help, dated 2002-09-22).
Checked in Brian Spilsbury's experimental Unicode, locales, and dialect support patchset. This lives on its own branch, so that people can play with it and tweak it, without disturbing 18e release engineering on the main branch. Bootstrapping has only been tried on LINKAGE_TABLE x86/Linux builds. A working cross-compile script is checked in under bootfiles/19a/boot1-cross-unicode.lisp. The script still leaves you with some interactive errors, on the cross compile, which you should answer with 2. See the mailing list for more information.
From Eric Marsden: * the PARSE-INTEGER function should signal an error of type PARSE-ERROR when the substring argument is not a valid representation of an integer.
Mega commit to bring RELENG_18 branch in sync with HEAD in preparation for release tagging 18d.
ANSI conformance fix from António Leitão via Joao Cachopo: According to the standard, COPY-READTABLE should copy the setting of READTABLE-CASE but the current version of CMUCL does not.
Change most PROCLAIMs to DECLAIMs.
This set of revisions brings the RELENG_18 branch up to HEAD in preparation for an 18c release.
Based on patches from Tim Moore; problem noted by Sam Steingold: o Fix sharp-backslash which had been binding the *readtable* to the std-lisp-readtable and breaking the recognition of the end of the token. o A new supporting function read-extended-token-escaped has been added that reads a token with the first character escaped, and internal-read-extended-token has been extended to handle the case in which the first character is to be escaped. o Fix the handling of single escapes within a double escape, within the function internal-read-extended-token.
Implement issue GET-MACRO-CHARACTER-READTABLE, the readtable argument of get-macro-character and get-dispatch-macro-character is a readtable designator and may be nil in which case it denotes the standard readtable. From Peter Van Eynde's branch.
This (huge) revision brings the RELENG_18 branch up to the current HEAD. Note code/unix-glib2.lisp not yet included -- not sure it is ready to go.
Streamline the Gray streams related dispatch code.
Restore the in-synonym-of, out-synonym-of, with-in-stream, and with-out-stream macros incorrectly replaced in the recent Gray stream changes.
Gray streams support: * Rename the 'stream structure class to sys:lisp-stream. * Add a new none hierarchical 'stream built-in class which inherits from: instance, t. * Hack in the new stream class as a mixin for the structure base lisp-stream class which now inherits from: stream, structure-object, instance, t. * Add a new 'fundamental-stream standard-class which includes 'stream as a mixin, and add PCL hacks to allow this to be redefined after PCL is loaded to be (defclass fundamental-stream (standard-object stream) ...). * Add appropriate support to the base stream functions to dispatch to the Gray stream functions for the handling of fundamental-streams. Some of the lisp-streams encapsulating CLOS streams still need a little work.
Removing simple-condition from the CPL of READER-ERROR broke error processing (should have noticed earlier, dang!). This change puts back the missing parts.
Change condition READER-ERROR to be a subclass of PARSE-ERROR as required by ANSI spec.
Ray Toy's fix for reading very large/small FP numbers
Fix headed boilerplate.
Slot list not optional in DEFINE-CONDITIOn.
Update to new DEFINE-CONDITION syntax.
Fix compiler warnings.
Added type decls from efficeincy notes.
Fixed dispatch macro characters to be case-insensitive, and to disallow digits as sub-characters.
Changed uses of DEFINE-CONDITION to use the new syntax.
Chagned the unmatched close parenthesis warning to include the file position so that it is easier to track them down.
Changed the return value of SET-SYNTAX-FROM-CHAR from NIL to T as per X3J13 cleanup RETURN-VALUES-UNSPECIFIED:SPECIFY. [Hard to believe nobody has complained about not conforming to this one.]
Print the package name instead of NIL when we can't find a package in symbol reading. Also, read |LISP|::cons as CONS, not |cons|.
Export new variable *ignore-extra-close-parentheses* if true (the default), extra close parens are only a warning, not an error. Export READER-ERROR, and change all reader code to signal this error as appropriate (or in some cases END-OF-FILE.) If a package is undefined, or an external symbol is missing, then signal READER-PACKAGE-ERROR (a subtype of READER-ERROR.) This allows #+ to suppress this error on features without suppressing all read errors. Changed these errors to only be signalled after the whole token has been gobbled, so that unwinding out of the handler won't leave the rest of the symbol unread. Improved readtable documentation. Fixed a number of problems with #=/##. ## now works correctly with #S structures, and also detects some new error conditions (such as multiply defined labels.) Also, we now bind the specials that control ## interaction so that if someone happens to read some other stream inside a read macro, things will still work. Added Ted's changes to make INTERNAL-READ-EXTENDED-TOKEN work when there are `|' escapes. The main significance of this is that #+nil '|foo;bar| and #:|foobar| now work properly. Also change this function to recognize unquoted colons so that #:foo:bar will error, but not #:foo\:bar. Changed to not gratuitously upcase the input, and for READ-EXTENDED-TOKEN to call CASIFY-READ-BUFFER so that when READTABLE-CASE is :PRESERVE, you can #:Foo, etc.
Added READTABLE-CASE. Added a print-function for READTABLE.
Made undefined read macro errors be ignored when *read-suppress* is T. Changed uses of 128 and 256 to be CHAR-CODE-LIMIT.
Changed readtable hackery functions to not assign their arguments.
Changed read-from-string and parse-integer to use with-array-data so that they will do bounds checking (and it makes them more tense as well.)
.../systems-work/code/reader.lisp, 26-Apr-90 16:19:15, Edit by Chiles. I fixed READ-QUOTE to call READ with t for eof-errorp which it previously failed to do. I fixed READ-PRESERVING-WHITESPACE to no longer screw with eof-errorp based on recursivep; this was a blatant bug probably from some misinterpretation of the manual years ago. I also cleaned up the code.
New file header with RCS header FILE-COMMENT.
Fixed bogus fixnum declaration in parse-integer.
Moved MIPS branch onto trunk; no merge necessary.
Fixed float reader for new FP support. This amounted to ripping out the old code for MAKE-FLOAT-AUX and making COERCE do the work.
Initial MIPS cut.
.../systems-work/code/reader.lisp, 10-Feb-90 13:14:40, Edit by MBB. Made GET-MACRO-CHARACTER and GET-DISPATCH-MACRO-CHARACTER use the default readtable when nil is supplied for the readtable argument. This is a cleanup.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|