Introduce sb!vm::fixnum-lowtags
[sbcl.git] / src / compiler / generic / early-objdef.lisp
index 550a515..2b78f6b 100644 (file)
 (def!constant nil-value
     (+ static-space-start n-word-bytes other-pointer-lowtag))
 
+(defconstant-eqx fixnum-lowtags
+    #.(let ((fixtags nil))
+        (do-external-symbols (sym "SB!VM")
+          (let* ((name (symbol-name sym))
+                 (len (length name)))
+            (when (and (boundp sym)
+                       (integerp (symbol-value sym))
+                       (> len 7)
+                       (string= name "-LOWTAG" :start1 (- len 7))
+                       (zerop (logand (symbol-value sym) fixnum-tag-mask)))
+              (push sym fixtags))))
+        `',fixtags)
+  #'equal)
+
 ;;; the heap types, stored in 8 bits of the header of an object on the
 ;;; heap, to identify the type of the heap object (which'll be at
 ;;; least two machine words, often more)