multiple-value type assertion stupidity

Bug #655581 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

(compile nil `(lambda (s) (the (unsigned-byte 8) (read-byte s))))

gives

; (THE (UNSIGNED-BYTE 8) (READ-BYTE S))
;
; note: type assertion too complex to check:
; (VALUES (UNSIGNED-BYTE 8) &REST T).

This is silly.

While (THE X (FOO)) is too complex to check when the number of values returned by FOO is in doubt, here we know that READ-BYTE will only return a single value -- and hence we could simplify the assertion to (VALUES (UNSIGNED-BYTE 8) &OPTIONAL).

Tags: compiler types
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

I misdiagnosed this initially.

The issue is really that READ-BYTE has been declared NOTINLINE, and NOTLINE currently has the side-effect of stopping the compiler from utilizing the proclaimed FTYPE.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

In 1.0.43.39.

Changed in sbcl:
status: Triaged → 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.