master: Remove fast-read-var-u-integer

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  99c5b76053eb85d10ba2694b6417a5a12bc1f372 (commit)
      from  4891fda939bb5a1d56d60864d679aea3e1f2fa75 (commit)

- Log -----------------------------------------------------------------
commit 99c5b76053eb85d10ba2694b6417a5a12bc1f372
Author: Stas Boukarev <[email protected]>
Date:   Sat Aug 29 03:58:30 2026 +0300

    Remove fast-read-var-u-integer
    
    Unused.
---
 src/code/load.lisp                  | 13 -------------
 src/code/primordial-extensions.lisp |  2 +-
 src/cold/exports.lisp               |  1 -
 tests/input-manifest.lisp-expr      |  1 +
 xperfecthash63.lisp-expr            | 37 +++++++++++++++++++++++++++++++++++++
 5 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/src/code/load.lisp b/src/code/load.lisp
index 7775422ca..610cfd673 100644
--- a/src/code/load.lisp
+++ b/src/code/load.lisp
@@ -183,19 +183,6 @@
                                         `(ash (fast-read-byte) ,(* i 8))))))
        (logior ,@bytes))))
 
-;;; like FAST-READ-U-INTEGER, but the size may be determined at run time
-(defmacro fast-read-var-u-integer (n)
-  (let ((n-pos (gensym))
-        (n-res (gensym))
-        (n-cnt (gensym)))
-    `(do ((,n-pos 8 (+ ,n-pos 8))
-          (,n-cnt (1- ,n) (1- ,n-cnt))
-          (,n-res
-           (fast-read-byte)
-           (dpb (fast-read-byte) (byte 8 ,n-pos) ,n-res)))
-         ((zerop ,n-cnt) ,n-res)
-       (declare (type index ,n-pos ,n-cnt)))))
-
 ;;; FIXME: why do all of these reading functions and macros declare
 ;;; (SPEED 0)?  was there some bug in the compiler which has since
 ;;; been fixed?  --njf, 2004-09-08
diff --git a/src/code/primordial-extensions.lisp b/src/code/primordial-extensions.lisp
index 094933fca..9e6dfe063 100644
--- a/src/code/primordial-extensions.lisp
+++ b/src/code/primordial-extensions.lisp
@@ -344,7 +344,7 @@
   '(("SB-INT" uncross hash-cons swapped-args-fun char-case-info packed-info-field
      type-bound-number
      prepare-for-fast-read-char fast-read-char done-with-fast-read-char
-     fast-read-var-u-integer fast-read-u-integer fast-read-s-integer
+     fast-read-u-integer fast-read-s-integer
      clear-flag)))
 
 (defun %defconstant-eqx-value (symbol expr eqx)
diff --git a/src/cold/exports.lisp b/src/cold/exports.lisp
index 88eecf037..74080124d 100644
--- a/src/cold/exports.lisp
+++ b/src/cold/exports.lisp
@@ -958,7 +958,6 @@ possibly temporarily, because it might be used internally.")
    "FAST-READ-CHAR-REFILL"
    "FAST-READ-S-INTEGER"
    "FAST-READ-U-INTEGER"
-   "FAST-READ-VAR-U-INTEGER"
    "FILE-NAME"
    "FORM-TRACKING-STREAM"
    "FORM-TRACKING-STREAM-OBSERVER"
diff --git a/tests/input-manifest.lisp-expr b/tests/input-manifest.lisp-expr
index 408030b73..c0436cee2 100644
--- a/tests/input-manifest.lisp-expr
+++ b/tests/input-manifest.lisp-expr
@@ -127,6 +127,7 @@
   "../contrib/sb-simd/test-suite/test-horizontal-functions-arm64.lisp"
   "../contrib/sb-simd/test-suite/test-horizontal-functions-x86-64.lisp"
   "../contrib/sb-simd/test-suite/test-hairy-simd-functions.lisp"
+  "../contrib/sb-simd/test-suite/test-arm64-regressions.lisp"
   "../contrib/sb-simd/test-suite/test-packages.lisp")
  ("sb-simple-streams.impure.lisp" "contrib/sb-simple-streams.fasl" "contrib/sb-bsd-sockets.fasl"
   "../contrib/sb-simple-streams/simple-stream-tests.lisp")
diff --git a/xperfecthash63.lisp-expr b/xperfecthash63.lisp-expr
index 3388017e4..db786dcfd 100644
--- a/xperfecthash63.lisp-expr
+++ b/xperfecthash63.lisp-expr
@@ -1835,5 +1835,42 @@
 (#(A49305EF D0241AE7 E55E7F8C EE9A5410)
  "(SB-PCL::%CLASS SB-PCL::%PARAMETER SB-PCL::%VARIABLE-REBINDING SPECIAL)"
  "((& (>> val 8) 3))")
+(#(5256235A 87C835DD E0AD3E74 ED8563BC F7158E95)
+ "((SB-VM::DESCRIPTOR-REG . 0) (SB-VM::CONTROL-STACK . 1) (SB-VM::SIGNED-REG . 2) (CONSTANT . 3) (SB-VM::ANY-REG . 4))"
+ "((& (+ val (>> val 2)) 7))")
+(#(2 6 A 16 2C)
+ "(1 5 3 11 22)"
+ "((let ((tab #a((4) (unsigned-byte 8) 0 6 2 0)))
+  (+= val #xe705d0f4)
+  (^= val (>> val 4))
+  (let ((b (& (>> val 2) #x3)))
+   (let ((a (>> (u32+ val (<< val 21)) 30)))
+    (^ a (aref tab b))))))")
+(#(2 6 A 18 2C)
+ "(1 5 3 12 22)"
+ "((let ((tab #a((4) (unsigned-byte 8) 3 1 0 4)))
+  (let ((b (& (>> val 2) #x3)))
+   (let ((a (>> (<< val 30) 30)))
+    (^ a (aref tab b))))))")
+(#(A E 10 16 2C)
+ "(11 22 7 8 5)"
+ "((let ((tab #a((4) (unsigned-byte 8) 2 2 6 0)))
+  (let ((b (& (>> val 1) #x3)))
+   (let ((a (>> (<< val 26) 30)))
+    (^ a (aref tab b))))))")
+(#(0 4 8 24 26 28 2E 30)
+ "(18 19 23 24 2 20 4 0)"
+ "((let ((tab #a((8) (unsigned-byte 8) 0 7 2 4 2 5 5 0)))
+  (+= val #xa4e87235)
+  (^= val (>> val 4))
+  (let ((b (& (>> val 1) #x7)))
+   (let ((a (>> (u32+ val (<< val 24)) 30)))
+    (^ a (aref tab b))))))")
+(#(2 A E 10 12 16 18 1A 1C 2C)
+ "(14 13 12 11 22 9 8 7 1 5)"
+ "((let ((tab #a((8) (unsigned-byte 8) 5 0 0 11 11 5 0 0)))
+  (let ((b (& (>> val 1) #x7)))
+   (let ((a (>> (<< val 26) 29)))
+    (^ a (aref tab b))))))")
 )
 ;; EOF

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.