X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fvm-fndb.lisp;h=f3903c2ab7dff3d0d56a155e8b315ea05fe39391;hb=25c9bfeaaf0597e37271dde31eed7037dba391e0;hp=8ed1ba1c2d5331b8e06afdc0d2a5dc9c3844d4f1;hpb=b1de52969f584c63d43fb35da4a8a6a4e0e619f0;p=sbcl.git diff --git a/src/compiler/generic/vm-fndb.lisp b/src/compiler/generic/vm-fndb.lisp index 8ed1ba1..f3903c2 100644 --- a/src/compiler/generic/vm-fndb.lisp +++ b/src/compiler/generic/vm-fndb.lisp @@ -21,10 +21,15 @@ complex-double-float-p #!+long-float complex-long-float-p complex-vector-p base-char-p %standard-char-p %instancep + base-string-p simple-base-string-p array-header-p - simple-array-p simple-array-unsigned-byte-2-p - simple-array-unsigned-byte-4-p simple-array-unsigned-byte-8-p - simple-array-unsigned-byte-16-p simple-array-unsigned-byte-32-p + simple-array-p simple-array-nil-p vector-nil-p + simple-array-unsigned-byte-2-p + simple-array-unsigned-byte-4-p simple-array-unsigned-byte-7-p + simple-array-unsigned-byte-8-p simple-array-unsigned-byte-15-p + simple-array-unsigned-byte-16-p simple-array-unsigned-byte-29-p + simple-array-unsigned-byte-31-p + simple-array-unsigned-byte-32-p simple-array-signed-byte-8-p simple-array-signed-byte-16-p simple-array-signed-byte-30-p simple-array-signed-byte-32-p simple-array-single-float-p simple-array-double-float-p @@ -55,9 +60,9 @@ (defknown vector-sap ((simple-unboxed-array (*))) system-area-pointer (flushable)) -(defknown get-lowtag (t) (unsigned-byte #.sb!vm:lowtag-bits) +(defknown lowtag-of (t) (unsigned-byte #.sb!vm:n-lowtag-bits) (flushable movable)) -(defknown get-type (t) (unsigned-byte #.sb!vm:type-bits) +(defknown widetag-of (t) (unsigned-byte #.sb!vm:n-widetag-bits) (flushable movable)) (defknown (get-header-data get-closure-length) (t) (unsigned-byte 24) @@ -65,6 +70,12 @@ (defknown set-header-data (t (unsigned-byte 24)) t (unsafe)) +(defknown %array-dimension (t index) index + (flushable)) +(defknown %set-array-dimension (t index index) index + ()) +(defknown %array-rank (t) index + (flushable)) (defknown %make-instance (index) instance (unsafe)) @@ -102,19 +113,14 @@ (foldable flushable)) (defknown %raw-ref-complex-double (raw-vector index) (complex double-float) (foldable flushable)) -#!+long-float -(defknown %raw-ref-complex-long (raw-vector index) (complex long-float) - (foldable flushable)) + (defknown %raw-set-complex-single (raw-vector index (complex single-float)) (complex single-float) (unsafe)) (defknown %raw-set-complex-double (raw-vector index (complex double-float)) (complex double-float) (unsafe)) -#!+long-float -(defknown %raw-set-complex-long (raw-vector index (complex long-float)) - (complex long-float) - (unsafe)) + (defknown %raw-bits (t fixnum) (unsigned-byte 32) (foldable flushable)) @@ -151,10 +157,10 @@ (defknown stack-ref (system-area-pointer index) t (flushable)) (defknown %set-stack-ref (system-area-pointer index t) t (unsafe)) (defknown lra-code-header (t) t (movable flushable)) -(defknown function-code-header (t) t (movable flushable)) +(defknown fun-code-header (t) t (movable flushable)) (defknown make-lisp-obj ((unsigned-byte 32)) t (movable flushable)) (defknown get-lisp-obj-address (t) (unsigned-byte 32) (movable flushable)) -(defknown function-word-offset (function) index (movable flushable)) +(defknown fun-word-offset (function) index (movable flushable)) ;;;; 32-bit logical operations @@ -228,7 +234,7 @@ (foldable flushable movable)) (defknown %fixnum-digit-with-correct-sign (bignum-element-type) - (signed-byte #.sb!vm:word-bits) + (signed-byte #.sb!vm:n-word-bits) (foldable flushable movable)) (defknown (%ashl %ashr %digit-logical-shift-right) @@ -239,23 +245,31 @@ (defknown copy-to-system-area ((simple-unboxed-array (*)) index system-area-pointer index index) - null + (values) ()) (defknown copy-from-system-area (system-area-pointer index (simple-unboxed-array (*)) index index) - null + (values) ()) (defknown system-area-copy (system-area-pointer index system-area-pointer index index) - null + (values) ()) (defknown bit-bash-copy ((simple-unboxed-array (*)) index (simple-unboxed-array (*)) index index) - null + (values) + ()) + +;;; (not really a bit-bashing routine, but starting to take over from +;;; bit-bashing routines in byte-sized copies as of sbcl-0.6.12.29:) +(defknown %byte-blt + ((or (simple-unboxed-array (*)) system-area-pointer) index + (or (simple-unboxed-array (*)) system-area-pointer) index index) + (values) ()) ;;;; code/function/fdefn object manipulation routines @@ -264,26 +278,26 @@ (defknown code-header-ref (t index) t (flushable)) (defknown code-header-set (t index t) t ()) -(defknown function-subtype (function) (unsigned-byte #.sb!vm:type-bits) +(defknown fun-subtype (function) (unsigned-byte #.sb!vm:n-widetag-bits) (flushable)) -(defknown ((setf function-subtype)) - ((unsigned-byte #.sb!vm:type-bits) function) - (unsigned-byte #.sb!vm:type-bits) +(defknown ((setf fun-subtype)) + ((unsigned-byte #.sb!vm:n-widetag-bits) function) + (unsigned-byte #.sb!vm:n-widetag-bits) ()) (defknown make-fdefn (t) fdefn (flushable movable)) (defknown fdefn-p (t) boolean (movable foldable flushable)) (defknown fdefn-name (fdefn) t (foldable flushable)) -(defknown fdefn-function (fdefn) (or function null) (flushable)) -(defknown (setf fdefn-function) (function fdefn) t (unsafe)) +(defknown fdefn-fun (fdefn) (or function null) (flushable)) +(defknown (setf fdefn-fun) (function fdefn) t (unsafe)) (defknown fdefn-makunbound (fdefn) t ()) -(defknown %function-self (function) function +(defknown %simple-fun-self (function) function (flushable)) -(defknown (setf %function-self) (function function) function +(defknown (setf %simple-fun-self) (function function) function (unsafe)) -(defknown %closure-function (function) function +(defknown %closure-fun (function) function (flushable)) (defknown %closure-index-ref (function index) t @@ -298,3 +312,7 @@ ;;;; mutator accessors (defknown mutator-self () system-area-pointer (flushable movable)) + +(defknown %data-vector-and-index (array index) + (values (simple-array * (*)) index) + (foldable flushable))