MCPcopy Create free account
hub / github.com/BitVM/BitVM / new

Method new

bitvm/src/hash/blake3_utils.rs:30–52  ·  view source on GitHub ↗
(stack: &mut StackTracker, use_full_tables: bool)

Source from the content-addressed store, hash-verified

28
29impl TablesVars {
30 pub(crate) fn new(stack: &mut StackTracker, use_full_tables: bool) -> Self {
31 let depth_lookup = if !use_full_tables {
32 u4_push_from_depth_half_lookup(stack, -18)
33 } else {
34 u4_push_from_depth_full_lookup(stack, -17)
35 };
36 let xor_table = if !use_full_tables {
37 u4_push_half_xor_table_stack(stack)
38 } else {
39 u4_push_full_xor_table_stack(stack)
40 };
41 let shift_tables = u4_push_shift_for_blake(stack);
42 let modulo = u4_push_modulo_for_blake(stack);
43 let quotient = u4_push_quotient_for_blake(stack);
44 TablesVars {
45 modulo,
46 quotient,
47 shift_tables,
48 xor_table,
49 depth_lookup,
50 use_full_tables,
51 }
52 }
53
54 pub(crate) fn drop(&self, stack: &mut StackTracker) {
55 stack.drop(self.quotient);

Callers

nothing calls this directly

Tested by

no test coverage detected