Skip to content

Commit

Permalink
Add ConstBody definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed May 9, 2024
1 parent a1638d4 commit f4c9ff5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/concrete_ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub struct ProgramBody {
/// This stores all the structs from all modules
pub structs: BTreeMap<DefId, AdtBody>,
/// The function signatures.
pub constants: BTreeMap<DefId, ConstBody>,
pub function_signatures: HashMap<DefId, (Vec<Ty>, Ty)>,
/// The file paths (program_id from the DefId) -> path.
pub file_paths: HashMap<usize, PathBuf>,
Expand Down Expand Up @@ -270,6 +271,13 @@ pub struct VariantDef {
pub ty: Ty,
}

#[derive(Debug, Clone)]
pub struct ConstBody {
pub id: DefId,
pub name: String,
pub value: ConstData,
}

// A definition id.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct DefId {
Expand Down

0 comments on commit f4c9ff5

Please sign in to comment.