Eliminate random-byte-vector outside of Edwin.
authorChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 2017 05:44:48 +0000 (21:44 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 2017 05:44:48 +0000 (21:44 -0800)
src/compiler/base/toplev.scm
src/compiler/machines/C/cout.scm
src/compiler/machines/C/ctop.scm
src/runtime/infstr.scm
src/runtime/random.scm
src/runtime/runtime.pkg

index 6c30328a1dcfc8da3fd09f5ee3345d5dea1af00b..2b2de22e2744d3af29c26ed7c5e50e41aee66d9c 100644 (file)
@@ -152,8 +152,7 @@ USA.
                 compiler:generate-lap-files?
                 (pathname-new-type output-pathname "lap")
                 (lambda (lap-output-port)
-                  (fluid-let ((*debugging-key*
-                               (random-byte-vector 32)))
+                  (fluid-let ((*debugging-key* (random-bytevector 32)))
                     (compile-scode/file/hook
                      input-pathname
                      output-pathname
index 1ae4ec43bf4a3a8055ada880498a9ca07ec990d8..4e7012d9220e299b9e31ab92338094a3745ae838 100644 (file)
@@ -425,7 +425,7 @@ USA.
 (define (make-nonce)
   (if *disable-nonces?*
       "nonce"
-      (vector-8b->hexadecimal (random-byte-vector 8))))
+      (bytevector->hexadecimal (random-bytevector 8))))
 \f
 (define (top-level/stackify handle ntags code-fn
                            decl-code-name code-name code-blocks
@@ -504,12 +504,12 @@ USA.
 (define (declare-dynamic-initialization handle)
   (c:line (c:call "DECLARE_DYNAMIC_INITIALIZATION"
                  (c:string handle)
-                 (c:string (vector-8b->hexadecimal (random-byte-vector 8))))))
+                 (c:string (bytevector->hexadecimal (random-bytevector 8))))))
 
 (define (declare-dynamic-object-initialization handle)
   (c:line (c:call "DECLARE_DYNAMIC_OBJECT_INITIALIZATION"
                  (c:string handle)
-                 (c:string (vector-8b->hexadecimal (random-byte-vector 8))))))
+                 (c:string (bytevector->hexadecimal (random-bytevector 8))))))
 
 (define (declare-subcodes decl-name blocks)
   (if (and (pair? blocks)
index fad9471f704e67b31b7cab6a0a83a04171f4cc6f..63657e852a1968a3feb545c3e7c1d32d0bffb50c 100644 (file)
@@ -77,7 +77,7 @@ USA.
   (fluid-let ((*compiler-file-handle*
               (string-append
                "(anonymous scode "
-               (vector-8b->hexadecimal (random-byte-vector 8))
+               (bytevector->hexadecimal (random-bytevector 8))
                ")")))
     (action)))
 
@@ -96,7 +96,7 @@ USA.
   (let ((typifier
         ;; Guarantee unique temporary files for liarc.  We could
         ;; instead change how the files are loaded.
-        (let ((suffix (vector-8b->hexadecimal (random-byte-vector #x10))))
+        (let ((suffix (bytevector->hexadecimal (random-bytevector #x10))))
           (lambda (type)
             (lambda (pathname)
               (pathname-new-type
index fbfc60c950e97c8c2b5a338d91720ae41a4e5882..5b0ff6645b35cb9886afc35e02dc2aabe7c970bc 100644 (file)
@@ -360,11 +360,13 @@ USA.
              (vector-ref v index)))))
 
 (define (dbg-info-key? object)
-  (and (string? object)
-       (fix:= (string-length object) 32)))
+  (or (and (bytevector? object)
+          (fix:= (bytevector-length object) 32))
+      (and (legacy-string? object)
+          (fix:= (legacy-string-length object) 32))))
 
 (define (dbg-info-key=? a b)
-  (string=? a b))
+  (equal? a b))
 
 (define (debug-info-pathname? object)
   (or (pathname? object)
index d63520d30f8a3fb8fffcded596a7edda3e4e9913..47198da5fcb2a614fce868dda8e06cd0545893f7 100644 (file)
@@ -166,14 +166,6 @@ USA.
                1.)
         flimit.))
 
-(define (random-byte-vector n #!optional state)
-  (let ((state (get-random-state state 'RANDOM-BYTE-VECTOR))
-       (s (make-vector-8b n)))
-    (do ((i 0 (fix:+ i 1)))
-       ((fix:= i n))
-      (vector-8b-set! s i (small-random-integer 256 state)))
-    s))
-
 (define (random-bytevector n #!optional state)
   (let ((state (get-random-state state 'random-bytevector))
        (bytes (make-bytevector n)))
index c4475fd38a8475b633766a14b8524a744be13a1a..8cd24ea5ffe805c64317b2319cf2cf799030084c 100644 (file)
@@ -4056,7 +4056,6 @@ USA.
          make-random-source
          make-random-state
          random
-         random-byte-vector
          random-bytevector
          random-integer
          random-real