initial commit

This commit is contained in:
Shunsuke Shibayama 2022-08-10 23:02:27 +09:00
commit 96132b20f6
346 changed files with 36806 additions and 0 deletions

17
src/compiler/optimize.rs Normal file
View file

@ -0,0 +1,17 @@
use crate::hir::HIR;
use crate::error::{CompileWarnings};
#[derive(Debug)]
pub struct HIROptimizer {
}
impl HIROptimizer {
pub fn fold_constants(&mut self, mut _hir: HIR) -> HIR { todo!() }
pub fn eliminate_unused_variables(&mut self, mut _hir: HIR) -> (HIR, CompileWarnings) { todo!() }
pub fn eliminate_dead_code(&mut self, mut _hir: HIR) -> (HIR, CompileWarnings) {
todo!()
}
}