X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fx86-vm.lisp;h=203b2bb7dce50030db2ff89852f120dc8814c705;hb=05525d3a5906d7a89fcb689c26177732493c40ce;hp=0b15e821eafba503d2e997d4bec7a0e49bc57ab9;hpb=62e95b4e33a18683689820eb5c1d1fd54098828a;p=sbcl.git diff --git a/src/code/x86-vm.lisp b/src/code/x86-vm.lisp index 0b15e82..203b2bb 100644 --- a/src/code/x86-vm.lisp +++ b/src/code/x86-vm.lisp @@ -52,6 +52,13 @@ (defvar *num-fixups* 0) ;;; FIXME: When the system runs, it'd be interesting to see what this is. +(declaim (inline adjust-fixup-array)) +(defun adjust-fixup-array (array size) + (let ((length (length array)) + (new (make-array size :element-type '(unsigned-byte 32)))) + (replace new array) + new)) + ;;; This gets called by LOAD to resolve newly positioned objects ;;; with things (like code instructions) that have to refer to them. ;;; @@ -69,8 +76,7 @@ (let ((fixups (code-header-ref code code-constants-offset))) (cond ((typep fixups '(simple-array (unsigned-byte 32) (*))) (let ((new-fixups - (adjust-array fixups (1+ (length fixups)) - :element-type '(unsigned-byte 32)))) + (adjust-fixup-array fixups (1+ (length fixups))))) (setf (aref new-fixups (length fixups)) offset) (setf (code-header-ref code code-constants-offset) new-fixups))) @@ -80,7 +86,7 @@ (zerop fixups)) (format t "** Init. code FU = ~S~%" fixups)) ; FIXME (setf (code-header-ref code code-constants-offset) - (make-specializable-array + (make-array 1 :element-type '(unsigned-byte 32) :initial-element offset))))))) @@ -133,8 +139,7 @@ (let ((fixups (code-header-ref code code-constants-offset))) (cond ((typep fixups '(simple-array (unsigned-byte 32) (*))) (let ((new-fixups - (adjust-array fixups (1+ (length fixups)) - :element-type '(unsigned-byte 32)))) + (adjust-fixup-array fixups (1+ (length fixups))))) (setf (aref new-fixups (length fixups)) offset) (setf (code-header-ref code code-constants-offset) new-fixups))) @@ -144,7 +149,7 @@ (zerop fixups)) (sb!impl::!cold-lose "Argh! can't process fixup")) (setf (code-header-ref code code-constants-offset) - (make-specializable-array + (make-array 1 :element-type '(unsigned-byte 32) :initial-element offset)))))))