diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-02-09 20:02:58 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-02-09 20:02:58 +0100 |
| commit | e5dbfcc7991317f7afe02a2f6a1d3663b260de30 (patch) | |
| tree | 4b8d0a79eea35ac93ae3510e4033df9970de83eb | |
| parent | 0965a15e7d9c37acc5830f69dfadfa4f811802e3 (diff) | |
| download | sylt-e5dbfcc7991317f7afe02a2f6a1d3663b260de30.tar.gz | |
continue to ignore typechecker
| -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) => { |
