From e5dbfcc7991317f7afe02a2f6a1d3663b260de30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 9 Feb 2021 20:02:58 +0100 Subject: continue to ignore typechecker --- src/vm.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/vm.rs b/src/vm.rs index 3215797..8b584af 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -198,7 +198,7 @@ impl VM { } /// Stop the program, violently - fn _crash_and_burn(&self) -> ! { + fn crash_and_burn(&self) -> ! { self.print_stack(); println!("\n"); self.frame().block.borrow().debug_print(); @@ -632,22 +632,22 @@ impl VM { self.pop(); } - Op::Define(ty) => { - let ty = self.ty(ty); - let top_type = self.stack.last().unwrap().into(); - match (ty, top_type) { - (Type::Unknown, top_type) - if top_type != Type::Unknown => {} - (a, b) if a != &b => { - error!(self, - ErrorKind::TypeError( - op, - vec![a.clone(), b.clone()]), - format!("Tried to assign a type {:?} to type {:?}.", a, b) - ); - } - _ => {} - } + Op::Define(_ty) => { + // let ty = self.ty(ty); + // let top_type = self.stack.last().unwrap().into(); + // match (ty, top_type) { + // (Type::Unknown, top_type) + // if top_type != Type::Unknown => {} + // (a, b) if a != &b => { + // error!(self, + // ErrorKind::TypeError( + // op, + // vec![a.clone(), b.clone()]), + // format!("Tried to assign a type {:?} to type {:?}.", a, b) + // ); + // } + // _ => {} + // } } Op::Call(num_args) => { -- cgit v1.2.1