From 9626aa05496a0e745252ba30bf64e8d020c6ec2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Wed, 20 Jan 2021 23:45:47 +0100 Subject: cleanup --- src/compiler.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/compiler.rs') diff --git a/src/compiler.rs b/src/compiler.rs index aca1b26..d72b8d3 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -143,7 +143,6 @@ impl Frame { } fn add_upvalue(&mut self, variable: Variable) -> Variable { - println!("{} - UPDOG", variable.name); let new_variable = Variable { outer_upvalue: variable.upvalue, outer_slot: variable.slot, @@ -552,9 +551,6 @@ impl Compiler { for var in self.frame().upvalues.iter() { function_block.ups.push((var.outer_slot, var.outer_upvalue, var.typ.clone())); } - println!("{:?}", function_block.ups); - // TODO(ed): Send the original place to find the upvalues, - // so we know from where to copy them. }); for op in function_block.ops.iter().rev() { @@ -586,7 +582,7 @@ impl Compiler { fn variable_expression(&mut self, block: &mut Block) { let name = match self.eat() { Token::Identifier(name) => name, - __ => unreachable!(), + _ => unreachable!(), }; if let Some(var) = self.find_variable(&name) { if var.upvalue { @@ -602,7 +598,7 @@ impl Compiler { } } - fn define_variable(&mut self, name: &str, typ: Type, block: &mut Block) -> Result { + fn define_variable(&mut self, name: &str, typ: Type, _block: &mut Block) -> Result { if let Some(var) = self.find_variable(&name) { if var.scope == self.frame().scope { error!(self, format!("Multiple definitions of {} in this block.", name)); -- cgit v1.2.1