start on typed IR

main
NotAFile 2022-01-30 23:54:19 +01:00
parent 33e332ef4f
commit 82b7d888bc
2 changed files with 17 additions and 0 deletions

View File

@ -9,6 +9,7 @@ pub use types::{Type, TypeStruct};
mod callable;
pub mod types;
pub mod typed_ir;
/// lots of code is still not width-aware, this constant keeps track of that
const TODO_WIDTH: u32 = 1;

16
src/frontend/typed_ir.rs Normal file
View File

@ -0,0 +1,16 @@
use super::types::Type;
/// an abstract element that performs some kind of computation on a value
struct Element<'ty> {
pub id: u32,
pub inputs: Vec<Element<'ty>>,
pub typ: Type<'ty>,
}
struct Signal<'ty> {
pub id: u32,
pub typ: Type<'ty>
}
struct Expression {
}