Ignore:
Timestamp:
Aug 11, 2008, 3:49:48 AM (12 years ago)
Author:
gb
Message:

Merge a lot of the CLOS/type-system changes from working-0711 branch
into trunk. Todo: compiler-macros for those changes.

Have -not- yet merged source-tracking changes, new record-source file
from working-0711, but this stuff seems to bootstrap in one swell foop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-format.lisp

    r6940 r10426  
    2626  (defmacro defformat (char name &rest def)
    2727    `(progn
    28        (add-format-char ,char (function (lambda . ,def)))
     28       (add-format-char ,char (nfunction ,name (lambda . ,def)))
    2929       ',name))
    3030  )
     
    6464; *format-control-string* and *format-length*, before returning.
    6565
    66 (defun sub-format (stream *format-index* *format-length* &aux (string *format-control-string*) char)
    67   (prog* ((length *format-length*) (i *format-index*) (lastpos i))
    68     (declare (fixnum i length lastpos))
     66(defun sub-format (stream *format-index* *format-length* &aux char)
     67  (prog* ((string (require-type *format-control-string* 'simple-string))
     68          (length *format-length*)
     69          (i *format-index*)
     70          (lastpos i))
     71    (declare (fixnum i length lastpos) (type simple-string string))
    6972    (go START)
    7073    EOF-ERROR
     
    7982        (let* ((limit (the fixnum (1- i))))
    8083          (unless (= limit lastpos)
    81             (write-string string stream :start  lastpos :end limit)))
     84            (write-simple-string string stream  lastpos limit)))
    8285        (let ((params nil) (fn) (colon nil) (atsign nil))
    8386          (block nil
     
    132135
    133136
    134 #|
     137#||
    135138(eval-when (load)
    136139  ;The non-consing version.
     
    284287) ;end of eval-when (load)
    285288
    286 |#
    287 
    288 ;Interim definitions
    289 
    290 ;This function is shadowed by CCL in order to use ~{ to print error messages.
     289||#
     290
     291;;;Interim definitions
     292
     293;;;This function is shadowed by CCL in order to use ~{ to print error messages.
    291294(defun format (stream control-string &rest format-arguments)
    292295  (declare (dynamic-extent format-arguments))
    293   (when (eq stream t) (setq stream *standard-output*))
    294296  (when (null stream)
    295297   (return-from format
    296298    (with-output-to-string (x)
    297299     (apply #'format x control-string format-arguments))))
    298   (unless (streamp stream) (report-bad-arg stream 'stream))
     300  (if (eq stream t)
     301    (setq stream *standard-output*)
     302    (unless (streamp stream) (report-bad-arg stream 'stream)))
    299303  (if (functionp control-string)
    300304    (apply control-string stream format-arguments)
Note: See TracChangeset for help on using the changeset viewer.