-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cider/flat] Instantiate the beginning flat environment (#1578)
* get a better definition for the bases * silly type shennanigans * store the entrypoint * can allocated the hopefully correct initial sizes * consolidate the imports * the environment exists now! * unused import * erroneous import * add a note about the sanity checks * clear out the warnings * add a basic stats printout for sanity checks
- Loading branch information
1 parent
488117c
commit de9fdd1
Showing
13 changed files
with
514 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use crate::flatten::{ | ||
flat_ir::prelude::CellInfo, structures::environment::Environment, | ||
}; | ||
|
||
use super::{prim_trait::DummyPrimitive, Primitive}; | ||
|
||
pub fn build_primitive( | ||
_prim: &CellInfo, | ||
_env: &Environment, | ||
) -> Box<dyn Primitive> { | ||
return DummyPrimitive::new_dyn(); | ||
|
||
#[allow(unreachable_code)] | ||
match &_prim.prototype { | ||
crate::flatten::flat_ir::cell_prototype::CellPrototype::Constant { | ||
value: _, | ||
width: _, | ||
c_type: _, | ||
} => todo!(), | ||
crate::flatten::flat_ir::cell_prototype::CellPrototype::Register { | ||
width: _, | ||
} => todo!(), | ||
crate::flatten::flat_ir::cell_prototype::CellPrototype::Unknown( | ||
_, | ||
_, | ||
) => todo!(), | ||
crate::flatten::flat_ir::cell_prototype::CellPrototype::Component( | ||
_, | ||
) => unreachable!( | ||
"Build primitive erroneously called on a calyx component" | ||
), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
mod builder; | ||
pub mod prim_trait; | ||
|
||
pub(crate) use builder::build_primitive; | ||
pub use prim_trait::Primitive; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.