From e8e050b6d430831f15eb5532cf1fa14982d4939c Mon Sep 17 00:00:00 2001 From: Linda Guiga Date: Thu, 5 Oct 2023 08:44:46 -0400 Subject: [PATCH] Limit visibility of helper functions --- evm/src/arithmetic/divmod.rs | 2 +- evm/src/arithmetic/mul.rs | 6 +++--- evm/src/arithmetic/shift.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/evm/src/arithmetic/divmod.rs b/evm/src/arithmetic/divmod.rs index 9f9d150d32..e143ded6dd 100644 --- a/evm/src/arithmetic/divmod.rs +++ b/evm/src/arithmetic/divmod.rs @@ -79,7 +79,7 @@ pub(crate) fn generate( } /// Verify that num = quo * den + rem and 0 <= rem < den. -pub fn eval_packed_divmod_helper( +pub(crate) fn eval_packed_divmod_helper( lv: &[P; NUM_ARITH_COLUMNS], nv: &[P; NUM_ARITH_COLUMNS], yield_constr: &mut ConstraintConsumer

, diff --git a/evm/src/arithmetic/mul.rs b/evm/src/arithmetic/mul.rs index bec9a0e9ce..c09c39d8dc 100644 --- a/evm/src/arithmetic/mul.rs +++ b/evm/src/arithmetic/mul.rs @@ -68,7 +68,7 @@ use crate::arithmetic::utils::*; use crate::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer}; /// Given the two limbs of `left_in` and `right_in`, computes `left_in * right_in`. -pub fn generate_mul(lv: &mut [F], left_in: [i64; 16], right_in: [i64; 16]) { +pub(crate) fn generate_mul(lv: &mut [F], left_in: [i64; 16], right_in: [i64; 16]) { const MASK: i64 = (1i64 << LIMB_BITS) - 1i64; // Input and output have 16-bit limbs @@ -120,7 +120,7 @@ pub fn generate(lv: &mut [F], left_in: U256, right_in: U256) { generate_mul(lv, input0, input1); } -pub fn eval_packed_generic_mul( +pub(crate) fn eval_packed_generic_mul( lv: &[P; NUM_ARITH_COLUMNS], filter: P, left_in_limbs: [P; 16], @@ -184,7 +184,7 @@ pub fn eval_packed_generic( eval_packed_generic_mul(lv, is_mul, input0_limbs, input1_limbs, yield_constr); } -pub fn eval_ext_mul_circuit, const D: usize>( +pub(crate) fn eval_ext_mul_circuit, const D: usize>( builder: &mut CircuitBuilder, lv: &[ExtensionTarget; NUM_ARITH_COLUMNS], filter: ExtensionTarget, diff --git a/evm/src/arithmetic/shift.rs b/evm/src/arithmetic/shift.rs index ddca484a2a..6600c01e54 100644 --- a/evm/src/arithmetic/shift.rs +++ b/evm/src/arithmetic/shift.rs @@ -81,7 +81,7 @@ pub fn generate( /// The logic is the same as the one for MUL. The only difference is that /// the inputs are in `INPUT_REGISTER_1` and `INPUT_REGISTER_2` instead of /// `INPUT_REGISTER_0` and `INPUT_REGISTER_1`. -pub fn eval_packed_shl( +fn eval_packed_shl( lv: &[P; NUM_ARITH_COLUMNS], yield_constr: &mut ConstraintConsumer

, ) { @@ -126,7 +126,7 @@ pub fn eval_packed_generic( eval_packed_shr(lv, nv, yield_constr); } -pub fn eval_ext_circuit_shl, const D: usize>( +fn eval_ext_circuit_shl, const D: usize>( builder: &mut CircuitBuilder, lv: &[ExtensionTarget; NUM_ARITH_COLUMNS], yield_constr: &mut RecursiveConstraintConsumer, @@ -145,7 +145,7 @@ pub fn eval_ext_circuit_shl, const D: usize>( ); } -pub fn eval_ext_circuit_shr, const D: usize>( +fn eval_ext_circuit_shr, const D: usize>( builder: &mut CircuitBuilder, lv: &[ExtensionTarget; NUM_ARITH_COLUMNS], nv: &[ExtensionTarget; NUM_ARITH_COLUMNS],