MCPcopy Create free account
hub / github.com/argumentcomputer/ix / compute_hash_consed_size

Function compute_hash_consed_size

crates/compile/src/compile.rs:1598–1602  ·  view source on GitHub ↗

Compute the hash-consed size from the info_map. This is the theoretical size if each unique subterm were stored once in a content-addressed store. Each unique expression = 32-byte key + value (with 32-byte hash references for children/externals).

(
  info_map: &std::collections::HashMap<blake3::Hash, sharing::SubtermInfo>,
)

Source from the content-addressed store, hash-verified

1596 }
1597 })?;
1598
1599 let (ref_idx, _) = cache.refs.insert_full(type_addr.clone());
1600 let name_addr = compile_name(type_name, stt);
1601
1602 stack.push(Frame::BuildProj(ref_idx as u64, idx_u64, name_addr));
1603 stack.push(Frame::Compile(struct_val.clone()));
1604 },
1605

Callers 1

apply_sharing_with_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected