Changeset 15852


Ignore:
Timestamp:
Jun 28, 2013, 9:18:59 AM (6 years ago)
Author:
gb
Message:

SPARSE-VECTOR-REF: if index is bogus, signal error more reasonably.
#* reader: don't call %CHARACTER-ATTRIBUTE on NIL. (This was causing
several test failures on PPC64 but was accidentally harmless on other
platforms.)

Location:
trunk/source
Files:
2 edited

Legend:

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

    r15446 r15852  
    936936               (>= (the fixnum i) 0)
    937937               (< (the fixnum i) (the fixnum (sparse-vector-size sv))))
    938     (%err-disp $xarroob sv i))
     938    (error "~s is not a valid index for ~s" i sv))
    939939  (locally (declare (fixnum i))
    940940    (let* ((major (ash i -8))
  • trunk/source/lib/read.lisp

    r15771 r15852  
    4949  (do* ((char (read-char input-stream nil nil t)
    5050              (read-char input-stream nil nil t))
    51         (attr (%character-attribute char (rdtab.ttab *readtable*))
    52               (%character-attribute char (rdtab.ttab *readtable*))))
     51        (attr 0))
    5352       ((or (null char)
    54             (= $cht_tmac attr)
     53            (= $cht_tmac (setq attr (%character-attribute char (rdtab.ttab *readtable*))))
    5554            (= $cht_wsp attr))
    5655        (if char (unread-char char input-stream)))
     56    (declare (type (unsigned-byte 8) attr))
    5757    (let ((number (- (char-code char) 48)))
    5858      (if (or (<= 0 number 1) *read-suppress*)
Note: See TracChangeset for help on using the changeset viewer.