wanted: &key type derivation in local calls

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

Bug Description

(in-package :sb-c)

(defknown compiler-derived-type (t) (values t t) (unsafe))

(deftransform compiler-derived-type ((x) (t) * :node node)
  (delay-ir1-transform node :optimize)
  (let ((type (type-specifier (lvar-type x))))
    `(values ',type t)))

(defun compiler-derived-type (x)
  (declare (ignore x))
  (values t nil))

(export 'compiler-derived-type)

(in-package :cl-user)

(funcall (compile nil `(lambda (y)
                         (declare (fixnum y))
                         (funcall (lambda (&key x)
                                    (sb-c:compiler-derived-type x))
                                  :x y)))
         13)

returns T, T -- but FIXNUM, T would be nice. (This is not the regression, but the way it has always been.)

tags: added: optimization
removed: performance
Stas Boukarev (stassats)
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.