type checking !?!?
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::{Len, TypeID};
|
||||
use super::{IRUInstruction, IRUProgram, Len, TypeID};
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub enum Type {
|
||||
Concrete(TypeID),
|
||||
Bits(u32),
|
||||
@@ -25,3 +25,20 @@ impl Type {
|
||||
Self::Slice(Box::new(self))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolve_types(ns: &IRUProgram) {
|
||||
for (i, f) in ns.iter_fns() {
|
||||
for inst in &f.instructions {
|
||||
match &inst.i {
|
||||
IRUInstruction::Mv { dest, src } => todo!(),
|
||||
IRUInstruction::Ref { dest, src } => todo!(),
|
||||
IRUInstruction::LoadData { dest, src } => todo!(),
|
||||
IRUInstruction::LoadSlice { dest, src } => todo!(),
|
||||
IRUInstruction::LoadFn { dest, src } => todo!(),
|
||||
IRUInstruction::Call { dest, f, args } => todo!(),
|
||||
IRUInstruction::AsmBlock { instructions, args } => todo!(),
|
||||
IRUInstruction::Ret { src } => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user