(defoptimizer (%rotate-byte derive-type) ((count size posn num))
;; FIXME: this looks fairly unwieldy. I'm sure it can be made
;; simpler, and also be made to deal with negative integers too.
- (let ((size (sb-c::continuation-type size)))
+ (let ((size (sb-c::lvar-type size)))
(if (numeric-type-p size)
(let ((size-high (numeric-type-high size))
- (num-type (sb-c::continuation-type num)))
+ (num-type (sb-c::lvar-type num)))
(if (and size-high
num-type
(<= size-high sb-vm:n-word-bits)
'integer)
(deftransform %rotate-byte ((count size pos integer)
- ((or (integer -31 -1) (integer 1 31))
+ ((integer -31 31)
(constant-arg (member 32))
(constant-arg (member 0))
(unsigned-byte 32)) *)
"inline 32-bit rotation"
+ ;; FIXME: What happens when, as here, the two type specifiers for
+ ;; COUNT overlap? Which gets to run first?
'(%unsigned-32-rotate-byte count integer))