X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffop.lisp;h=417a12c7b9471dc64122359e7e86055c76ede06d;hb=b0b168c08b31a748150f404398af754f26fd4813;hp=bf65fdda1f0755752d46a94ac7373c27a0816ddf;hpb=3c65762b927af861c9c8bc416e4cbac9a14ec0c3;p=sbcl.git diff --git a/src/code/fop.lisp b/src/code/fop.lisp index bf65fdd..417a12c 100644 --- a/src/code/fop.lisp +++ b/src/code/fop.lisp @@ -37,7 +37,7 @@ (error "multiple codes for fop name ~S: ~D and ~D" name code ocode))) (setf (svref *fop-names* code) name (get name 'fop-code) code - (svref *fop-functions* code) (symbol-function name)) + (svref *fop-funs* code) (symbol-function name)) (values)) ;;; Define a pair of fops which are identical except that one reads @@ -110,7 +110,7 @@ (declare (ignorable arg)) #!+sb-show (when *show-fop-nop4-p* - (format *debug-io* "~&/FOP-NOP4 ARG=~D=#X~X~%" arg arg)))) + (format *debug-io* "~&/FOP-NOP4 ARG=~W=#X~X~%" arg arg)))) (define-fop (fop-nop 0 :nope)) (define-fop (fop-pop 1 nil) (push-fop-table (pop-stack))) @@ -153,6 +153,7 @@ (find-and-init-or-check-layout name length inherits depthoid))) (define-fop (fop-end-group 64 :nope) + (/show0 "THROWing FASL-GROUP-END") (throw 'fasl-group-end t)) ;;; In the normal loader, we just ignore these. GENESIS overwrites @@ -423,13 +424,13 @@ (define-fop (fop-single-float-vector 84) (let* ((length (read-arg 4)) (result (make-array length :element-type 'single-float))) - (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:word-bytes)) + (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:n-word-bytes)) result)) (define-fop (fop-double-float-vector 85) (let* ((length (read-arg 4)) (result (make-array length :element-type 'double-float))) - (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:word-bytes 2)) + (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:n-word-bytes 2)) result)) #!+long-float @@ -439,19 +440,22 @@ (read-n-bytes *fasl-input-stream* result 0 - (* length sb!vm:word-bytes #!+x86 3 #!+sparc 4)) + (* length sb!vm:n-word-bytes #!+x86 3 #!+sparc 4)) result)) (define-fop (fop-complex-single-float-vector 86) (let* ((length (read-arg 4)) (result (make-array length :element-type '(complex single-float)))) - (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:word-bytes 2)) + (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:n-word-bytes 2)) result)) (define-fop (fop-complex-double-float-vector 87) (let* ((length (read-arg 4)) (result (make-array length :element-type '(complex double-float)))) - (read-n-bytes *fasl-input-stream* result 0 (* length sb!vm:word-bytes 2 2)) + (read-n-bytes *fasl-input-stream* + result + 0 + (* length sb!vm:n-word-bytes 2 2)) result)) #!+long-float @@ -459,13 +463,14 @@ (let* ((length (read-arg 4)) (result (make-array length :element-type '(complex long-float)))) (read-n-bytes *fasl-input-stream* result 0 - (* length sb!vm:word-bytes #!+x86 3 #!+sparc 4 2)) + (* length sb!vm:n-word-bytes #!+x86 3 #!+sparc 4 2)) result)) -;;; *** NOT *** the FOP-INT-VECTOR as currently documented in rtguts. Size -;;; must be a directly supported I-vector element size, with no extra bits. -;;; This must be packed according to the local byte-ordering, allowing us to -;;; directly read the bits. +;;; CMU CL comment: +;;; *** NOT *** the FOP-INT-VECTOR as currently documented in rtguts. +;;; Size must be a directly supported I-vector element size, with no +;;; extra bits. This must be packed according to the local +;;; byte-ordering, allowing us to directly read the bits. (define-fop (fop-int-vector 43) (prepare-for-fast-read-byte *fasl-input-stream* (let* ((len (fast-read-u-integer 4)) @@ -485,7 +490,7 @@ res 0 (ceiling (the index (* size len)) - sb!vm:byte-bits)) + sb!vm:n-byte-bits)) res))) ;;; This is the same as FOP-INT-VECTOR, except this is for signed @@ -508,7 +513,7 @@ 0 (ceiling (the index (* (if (= size 30) 32 ; Adjust for (signed-byte 30) - size) len)) sb!vm:byte-bits)) + size) len)) sb!vm:n-byte-bits)) res))) (define-fop (fop-eval 53) @@ -632,9 +637,9 @@ bug.~:@>") (setf (code-header-ref code (clone-arg)) value) (values))) -(define-fop (fop-function-entry 142) +(define-fop (fop-fun-entry 142) #+sb-xc-host ; since xc host doesn't know how to compile %PRIMITIVE - (error "FOP-FUNCTION-ENTRY can't be defined without %PRIMITIVE.") + (error "FOP-FUN-ENTRY can't be defined without %PRIMITIVE.") #-sb-xc-host (let ((type (pop-stack)) (arglist (pop-stack)) @@ -645,7 +650,7 @@ bug.~:@>") (unless (zerop (logand offset sb!vm:lowtag-mask)) (error "internal error: unaligned function object, offset = #X~X" offset)) - (let ((fun (%primitive sb!c:compute-function code-object offset))) + (let ((fun (%primitive sb!c:compute-fun code-object offset))) (setf (%simple-fun-self fun) fun) (setf (%simple-fun-next fun) (%code-entry-points code-object)) (setf (%code-entry-points code-object) fun)