X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffop.lisp;h=6a443622bd19a7d18f46045ecea3a19c69004455;hb=9d319ffac125d7991c3be4c147103df119d24db6;hp=33146bf30321ca9677658f948df3d9e6be7cb908;hpb=6198ab492260b440a551e29b274bdd4ac5534dbb;p=sbcl.git diff --git a/src/code/fop.lisp b/src/code/fop.lisp index 33146bf..6a44362 100644 --- a/src/code/fop.lisp +++ b/src/code/fop.lisp @@ -89,11 +89,11 @@ #+sb-xc-host (bug "READ-STRING-AS-WORDS called") (dotimes (i length) (setf (aref string i) - (sb!xc:code-char (logior - (read-byte stream) - (ash (read-byte stream) 8) - (ash (read-byte stream) 16) - (ash (read-byte stream) 24))))) + (let ((code 0)) + ;; FIXME: is this the same as READ-WORD-ARG? + (dotimes (k sb!vm:n-word-bytes (sb!xc:code-char code)) + (setf code (logior code (ash (read-byte stream) + (* k sb!vm:n-byte-bits)))))))) (values)) ;;;; miscellaneous fops @@ -142,18 +142,25 @@ (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")