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

Function decompile_quotient

crates/compile/src/decompile.rs:1647–1656  ·  view source on GitHub ↗

Decompile a Quotient.

(
  quot: &Quotient,
  meta: &ConstantMeta,
  cache: &mut BlockCache,
  stt: &CompileState,
  dstt: &DecompileState,
)

Source from the content-addressed store, hash-verified

1645 }
1646}
1647
1648/// Extract arena and type_root from ConstantMeta.
1649fn get_arena_and_type_root(meta: &ConstantMeta) -> (&ExprMeta, u64) {
1650 static EMPTY_ARENA: ExprMeta = ExprMeta { nodes: Vec::new() };
1651 match &meta.info {
1652 ConstantMetaInfo::Def { arena, type_root, .. } => (arena, *type_root),
1653 ConstantMetaInfo::Axio { arena, type_root, .. } => (arena, *type_root),
1654 ConstantMetaInfo::Quot { arena, type_root, .. } => (arena, *type_root),
1655 ConstantMetaInfo::Indc { arena, type_root, .. } => (arena, *type_root),
1656 ConstantMetaInfo::Ctor { arena, type_root, .. } => (arena, *type_root),
1657 ConstantMetaInfo::Rec { arena, type_root, .. } => (arena, *type_root),
1658 ConstantMetaInfo::Empty => (&EMPTY_ARENA, 0),
1659 ConstantMetaInfo::Muts { .. } => (&EMPTY_ARENA, 0),

Callers 1

decompile_constFunction · 0.85

Calls 1

decompile_const_valFunction · 0.85

Tested by

no test coverage detected