]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "math.parser: faster hex-string conversions with less bounds checking."
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Jan 2022 18:52:38 +0000 (10:52 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Jan 2022 18:52:38 +0000 (10:52 -0800)
This reverts commit 89a8817c170c1539a735fa6f3e6ab302d9674e5a.

core/math/parser/parser.factor

index 0802242165be09e5eec922695e551dac770b1e93..93c139a19c8f079a390ff853f91077262e18cfad 100644 (file)
@@ -591,9 +591,9 @@ M: float >base
     dup length 2/ <byte-array> [
         [
             [ digit> ] 2dip over even? [
-                [ 16 * ] [ 2/ ] [ set-nth-unsafe ] tri*
+                [ 16 * ] [ 2/ ] [ set-nth ] tri*
             ] [
-                [ 2/ ] [ [ + ] change-nth-unsafe ] bi*
+                [ 2/ ] [ [ + ] change-nth ] bi*
             ] if
         ] curry each-index
     ] keep ;
@@ -603,6 +603,6 @@ M: float >base
         [
             [ 16 /mod [ >digit ] bi@ ]
             [ 2 * dup 1 + ]
-            [ [ set-nth-unsafe ] curry bi-curry@ bi* ] tri*
+            [ [ set-nth ] curry bi-curry@ bi* ] tri*
         ] curry each-index
     ] keep ;