Skip to content
Snippets Groups Projects
Commit 2f2d7cca authored by emarsden's avatar emarsden
Browse files

Tell the compiler that READ-DELIMITED-LIST always returns a list.

Compiling the following function generates an efficiency note; with
the patch the note disappears.

  (defun foo ()
    (declare (optimize speed))
    (let* ((stream (make-string-input-stream "0 1 2 3)"))
           (read (read-delimited-list #\) stream)))
      (find 2 read)))

; (find 2 read)
; Note: Unable to optimize due to type uncertainty:
; The second argument is a (or null vector cons), not a simple-base-string.

Problem and fix from Tony Martinez via SBCL.
parent 5185ba67
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment