diff options
Diffstat (limited to 'src/vm.rs')
| -rw-r--r-- | src/vm.rs | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -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) => { |
