(let* ((size (clone-arg))
(res (%make-instance size)))
(declare (type index size))
- (do ((n (1- size) (1- n)))
- ((minusp n))
- (declare (type index-or-minus-1 n))
- (setf (%instance-ref res n) (pop-stack)))
+ (let* ((layout (pop-stack))
+ (nuntagged (layout-n-untagged-slots layout))
+ (ntagged (- size nuntagged)))
+ (setf (%instance-ref res 0) layout)
+ (dotimes (n (1- ntagged))
+ (declare (type index n))
+ (setf (%instance-ref res (1+ n)) (pop-stack)))
+ (dotimes (n nuntagged)
+ (declare (type index n))
+ (setf (%raw-instance-ref/word res (- nuntagged n 1)) (pop-stack))))
res))
(define-fop (fop-layout 45)
- (let ((length (pop-stack))
+ (let ((nuntagged (pop-stack))
+ (length (pop-stack))
(depthoid (pop-stack))
(inherits (pop-stack))
(name (pop-stack)))
- (find-and-init-or-check-layout name length inherits depthoid)))
+ (find-and-init-or-check-layout name length inherits depthoid nuntagged)))
(define-fop (fop-end-group 64 :stackp nil)
(/show0 "THROWing FASL-GROUP-END")