From 22834b036f0a116da44eab68e34ea8e09e9a651f Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Tue, 16 Apr 2024 14:22:05 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20use=20constant=20=E2=80=9Clookup=20tab?= =?UTF-8?q?le=20height=E2=80=9D=20more?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- triton-vm/src/aet.rs | 4 ++-- triton-vm/src/table/master_table.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/triton-vm/src/aet.rs b/triton-vm/src/aet.rs index 4d686fb70..72b4a17e5 100644 --- a/triton-vm/src/aet.rs +++ b/triton-vm/src/aet.rs @@ -74,7 +74,7 @@ pub struct AlgebraicExecutionTrace { pub cascade_table_lookup_multiplicities: HashMap, /// Records how often each entry in the lookup table was looked up. - pub lookup_table_lookup_multiplicities: [u64; 1 << 8], + pub lookup_table_lookup_multiplicities: [u64; AlgebraicExecutionTrace::LOOKUP_TABLE_HEIGHT], } #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash, Arbitrary)] @@ -84,7 +84,7 @@ pub struct TableHeight { } impl AlgebraicExecutionTrace { - const LOOKUP_TABLE_HEIGHT: usize = 1 << 8; + pub(crate) const LOOKUP_TABLE_HEIGHT: usize = 1 << 8; pub fn new(program: Program) -> Self { let program_len = program.len_bwords(); diff --git a/triton-vm/src/table/master_table.rs b/triton-vm/src/table/master_table.rs index b2050d5ee..5d7c2100c 100644 --- a/triton-vm/src/table/master_table.rs +++ b/triton-vm/src/table/master_table.rs @@ -734,7 +734,7 @@ impl MasterBaseTable { jump_stack_table_len, self.hash_coprocessor_execution_len, self.cascade_table_len, - 1 << 8, + AlgebraicExecutionTrace::LOOKUP_TABLE_HEIGHT, self.u32_coprocesor_execution_len, ] }