-(defun get-lowtag (x)
- #!+sb-doc
- "Returns the three-bit lowtag for the object X."
- (get-lowtag x))
-
-(defun get-type (x)
- #!+sb-doc
- "Returns the 8-bit header type for the object X."
- (get-type x))
-
+(defun lowtag-of (x)
+ (lowtag-of x))
+
+(defun widetag-of (x)
+ (widetag-of x))
+
+;;; WIDETAG-OF needs extra code to handle LIST and FUNCTION lowtags. When
+;;; we're only dealing with other pointers (eg. when dispatching on array
+;;; element type), this is going to be faster.
+(declaim (inline %other-pointer-widetag))
+(defun %other-pointer-widetag (x)
+ (sb!sys:sap-ref-8 (int-sap (get-lisp-obj-address x))
+ #.(ecase sb!c:*backend-byte-order*
+ (:little-endian
+ (- sb!vm:other-pointer-lowtag))
+ (:big-endian
+ (- (1- sb!vm:n-word-bytes) sb!vm:other-pointer-lowtag)))))
+
+;;; Return a System-Area-Pointer pointing to the data for the vector
+;;; X, which must be simple.
+;;;
+;;; FIXME: So it should be SIMPLE-VECTOR-SAP, right? (or UNHAIRY-VECTOR-SAP,
+;;; if the meaning is (SIMPLE-ARRAY * 1) instead of SIMPLE-VECTOR)
+;;; (or maybe SIMPLE-VECTOR-DATA-SAP or UNHAIRY-VECTOR-DATA-SAP?)