sb!vm:instance-header-widetag sb!vm:instance-pointer-lowtag
nil)
+#!+stack-allocatable-fixed-objects
(defoptimizer (%make-structure-instance stack-allocate-result) ((&rest args) node dx)
t)
(macrolet ((make-case ()
`(ecase raw-type
((t)
- (vop set-slot node block object arg-tn
+ (vop init-slot node block object arg-tn
name (+ sb!vm:instance-slots-offset slot) lowtag))
,@(mapcar (lambda (rsd)
`(,(sb!kernel::raw-slot-data-raw-type rsd)
nil))))
(make-case))))
(:dd
- (vop set-slot node block object
+ (vop init-slot node block object
(emit-constant (sb!kernel::dd-layout-or-lose slot))
name sb!vm:instance-slots-offset lowtag))
(otherwise
- (vop set-slot node block object
+ (vop init-slot node block object
(ecase kind
(:arg
(aver args)
node block (list value-tn) (node-lvar node))))))))
;;; Stack allocation optimizers per platform support
-;;;
-;;; Platforms with stack-allocatable vectors
-#!+(or hppa mips x86 x86-64)
+#!+stack-allocatable-vectors
(progn
(defoptimizer (allocate-vector stack-allocate-result)
((type length words) node dx)
- (or (eq dx :truly)
+ (or (eq dx :always-dynamic)
(zerop (policy node safety))
;; a vector object should fit in one page -- otherwise it might go past
;; stack guard pages.
(annotate-1-value-lvar arg)))))
;;; ...lists
-#!+(or alpha hppa mips ppc sparc x86 x86-64)
+#!+stack-allocatable-lists
(progn
(defoptimizer (list stack-allocate-result) ((&rest args) node dx)
(declare (ignore node dx))
t))
;;; ...conses
-#!+(or hppa mips x86 x86-64)
-(defoptimizer (cons stack-allocate-result) ((&rest args) node dx)
- (declare (ignore node dx))
- t)
+#!+stack-allocatable-fixed-objects
+(progn
+ (defoptimizer (cons stack-allocate-result) ((&rest args) node dx)
+ t)
+ (defoptimizer (%make-complex stack-allocate-result) ((&rest args) node dx)
+ t))