wishlist: ~:* to muffle compiler notes.

Bug #1946246 reported by SATO shinichi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Douglas Katzman

Bug Description

(defun test ()
  (declare (optimize speed))
  (formatter "~:*"))

; in: DEFUN TEST
; (FORMATTER "~:*")
;
; note: forced to do GENERIC-- (cost 10)
; unable to do inline fixnum arithmetic (cost 1) because:
; The first argument is a UNSIGNED-BYTE, not a FIXNUM.
; The result is a (VALUES (INTEGER -1) &OPTIONAL), not a (VALUES FIXNUM
; &REST T).
; unable to do inline fixnum arithmetic (cost 2) because:
; The first argument is a UNSIGNED-BYTE, not a FIXNUM.
; The result is a (VALUES (INTEGER -1) &OPTIONAL), not a (VALUES FIXNUM
; &REST T).
; etc.
;
; note: forced to do FAST-IF-<-ZERO (cost 9)
; unable to do inline fixnum comparison (cost 3) because:
; The first argument is a (INTEGER -1), not a FIXNUM.
; unable to do inline fixnum comparison (cost 4) because:
; The first argument is a (INTEGER -1), not a FIXNUM.
;
; note: forced to do GENERIC-> (cost 10)
; unable to do inline fixnum comparison (cost 4) because:
; The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;
; note: forced to do GENERIC-+ (cost 10)
; unable to do inline fixnum arithmetic (cost 1) because:
; The first argument is a UNSIGNED-BYTE, not a FIXNUM.
; The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
; &REST T).
; unable to do inline fixnum arithmetic (cost 2) because:
; The first argument is a UNSIGNED-BYTE, not a FIXNUM.
; The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
; &REST T).
; etc.

Formatter generates a function that uses &REST lambda list keyword for ORIG-ARGS.
This means the max length of the list ORIG-ARGS is (1- CALL-ARGUMENTS-LIMIT),
(one is for STREAM the first argument of the formatter function)
and in sbcl, (= call-arguments-limit most-positive-fixnum) is T.
So we can safely declare CUR-POSN and NEW-POSN as FIXNUM.

summary: - withlist: ~:* to muffle compiler notes.
+ wishlist: ~:* to muffle compiler notes.
Douglas Katzman (dougk)
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.