Skip to content

Commit

Permalink
Limit visibility of helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga committed Oct 5, 2023
1 parent 39dc14c commit e8e050b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion evm/src/arithmetic/divmod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub(crate) fn generate<F: PrimeField64>(
}

/// Verify that num = quo * den + rem and 0 <= rem < den.
pub fn eval_packed_divmod_helper<P: PackedField>(
pub(crate) fn eval_packed_divmod_helper<P: PackedField>(
lv: &[P; NUM_ARITH_COLUMNS],
nv: &[P; NUM_ARITH_COLUMNS],
yield_constr: &mut ConstraintConsumer<P>,
Expand Down
6 changes: 3 additions & 3 deletions evm/src/arithmetic/mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<F: PrimeField64>(lv: &mut [F], left_in: [i64; 16], right_in: [i64; 16]) {
pub(crate) fn generate_mul<F: PrimeField64>(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
Expand Down Expand Up @@ -120,7 +120,7 @@ pub fn generate<F: PrimeField64>(lv: &mut [F], left_in: U256, right_in: U256) {
generate_mul(lv, input0, input1);
}

pub fn eval_packed_generic_mul<P: PackedField>(
pub(crate) fn eval_packed_generic_mul<P: PackedField>(
lv: &[P; NUM_ARITH_COLUMNS],
filter: P,
left_in_limbs: [P; 16],
Expand Down Expand Up @@ -184,7 +184,7 @@ pub fn eval_packed_generic<P: PackedField>(
eval_packed_generic_mul(lv, is_mul, input0_limbs, input1_limbs, yield_constr);
}

pub fn eval_ext_mul_circuit<F: RichField + Extendable<D>, const D: usize>(
pub(crate) fn eval_ext_mul_circuit<F: RichField + Extendable<D>, const D: usize>(
builder: &mut CircuitBuilder<F, D>,
lv: &[ExtensionTarget<D>; NUM_ARITH_COLUMNS],
filter: ExtensionTarget<D>,
Expand Down
6 changes: 3 additions & 3 deletions evm/src/arithmetic/shift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub fn generate<F: PrimeField64>(
/// 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<P: PackedField>(
fn eval_packed_shl<P: PackedField>(
lv: &[P; NUM_ARITH_COLUMNS],
yield_constr: &mut ConstraintConsumer<P>,
) {
Expand Down Expand Up @@ -126,7 +126,7 @@ pub fn eval_packed_generic<P: PackedField>(
eval_packed_shr(lv, nv, yield_constr);
}

pub fn eval_ext_circuit_shl<F: RichField + Extendable<D>, const D: usize>(
fn eval_ext_circuit_shl<F: RichField + Extendable<D>, const D: usize>(
builder: &mut CircuitBuilder<F, D>,
lv: &[ExtensionTarget<D>; NUM_ARITH_COLUMNS],
yield_constr: &mut RecursiveConstraintConsumer<F, D>,
Expand All @@ -145,7 +145,7 @@ pub fn eval_ext_circuit_shl<F: RichField + Extendable<D>, const D: usize>(
);
}

pub fn eval_ext_circuit_shr<F: RichField + Extendable<D>, const D: usize>(
fn eval_ext_circuit_shr<F: RichField + Extendable<D>, const D: usize>(
builder: &mut CircuitBuilder<F, D>,
lv: &[ExtensionTarget<D>; NUM_ARITH_COLUMNS],
nv: &[ExtensionTarget<D>; NUM_ARITH_COLUMNS],
Expand Down

0 comments on commit e8e050b

Please sign in to comment.