X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fvm-fndb.lisp;h=69b835a73c0c07bc0bd174f41b989479cd5d7987;hb=4d58eac755342319f7a25391606fed86541e5fef;hp=1464c0ace470a172b7625ed70f42575fbbc018b7;hpb=39ca94ec421224c78cb01f7d2d7b49321c66a2d4;p=sbcl.git diff --git a/src/compiler/generic/vm-fndb.lisp b/src/compiler/generic/vm-fndb.lisp index 1464c0a..69b835a 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 @@ -50,14 +55,20 @@ (defknown %sxhash-simple-substring (simple-string index) index (foldable flushable)) +(defknown symbol-hash (symbol) (integer 0 #.sb!xc:most-positive-fixnum) + (flushable movable)) + +(defknown %set-symbol-hash (symbol (integer 0 #.sb!xc:most-positive-fixnum)) + t (unsafe)) + (defknown vector-length (vector) index (flushable)) (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 +76,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 +119,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 +163,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 +240,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 +251,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 +284,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 @@ -292,16 +312,13 @@ (defknown %make-funcallable-instance (index layout) function (unsafe)) -;;; FIXME/REMOVEME: MNA patched these like this, but I don't -;;; understand why, so I mutated them back to see what goes wrong. -;;;-(defknown %funcallable-instance-info (function index) t (flushable)) -;;;-(defknown %set-funcallable-instance-info (function index t) t (unsafe)) -;;;+(defknown %funcallable-instance-info ((or function cons) index) t (flushable)) -;;;+(defknown %set-funcallable-instance-info ((or function cons) index t) t (unsafe)) -;;; (defknown %funcallable-instance-info (function index) t (flushable)) (defknown %set-funcallable-instance-info (function index t) t (unsafe)) ;;;; mutator accessors (defknown mutator-self () system-area-pointer (flushable movable)) + +(defknown %data-vector-and-index (array index) + (values (simple-array * (*)) index) + (foldable flushable))