(multiple-value-bind (func index-args) (extract-fun-args index '(+ -) 2)
(destructuring-bind (x constant) index-args
(unless (and (constant-lvar-p constant)
- ;; the remaining argument must be a fixnum, otherwise we lose
+ ;; we lose if the remaining argument isn't a fixnum
(csubtypep (lvar-type x) (specifier-type 'fixnum)))
- (delay-ir1-transform :constraint)
(give-up-ir1-transform))
(let ((value (lvar-value constant))
new-offset)
(unless (and (integerp value)
(sb!vm::foldable-constant-offset-p
element-size lowtag data-offset
- (setf new-offset (funcall func (lvar-value offset) value))))
+ (setf new-offset (funcall func (lvar-value offset)
+ value))))
(give-up-ir1-transform "constant is too large for inlining"))
(splice-fun-args index func 2)
`(lambda (thing index off1 off2 ,@(when setter-p