]> git.codecow.com Git - nano25519.git/commitdiff
Merge single-use function into caller.
authorChris Duncan <chris@codecow.com>
Fri, 21 Aug 2026 17:32:29 +0000 (10:32 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 21 Aug 2026 17:32:29 +0000 (10:32 -0700)
src/assembly/ge.ts

index cad006ae6b7f70e7f3da584de081019b17226600..7e04541199484ca1b5381b80b58d716c4ebc1bb3 100644 (file)
@@ -32,10 +32,13 @@ function ge_cmov (t: ge_precomp, u: ge_precomp, b: u8): void {
 }
 
 const ge25519_cmov8_minust: ge_precomp = new ge_precomp()
-function ge_cmov8 (t: ge_precomp, precomp: StaticArray<ge_precomp>, b: i8): void {
+//@ts-expect-error
+@inline
+function ge_cmov8_base (t: ge_precomp, pos: i32, b: i8): void {
        const minust = ge25519_cmov8_minust
        const bnegative: u8 = negative(b)
        const babs: u8 = b - (((-bnegative) & b) * (i8(1) << 1))
+       const precomp = base(pos)
 
        ge_precomp_0(t)
        ge_cmov(t, precomp[0], equal(babs, 1))
@@ -53,12 +56,6 @@ function ge_cmov8 (t: ge_precomp, precomp: StaticArray<ge_precomp>, b: i8): void
        ge_cmov(t, minust, bnegative)
 }
 
-//@ts-expect-error
-@inline
-function ge_cmov8_base (t: ge_precomp, pos: i32, b: i8): void {
-       ge_cmov8(t, base(pos), b)
-}
-
 const u: FieldElement = fe()
 const v: FieldElement = fe()
 const v3: FieldElement = fe()