From cb5085b7cce6e0a64faabee23a44aaa53c4eefcd Mon Sep 17 00:00:00 2001 From: spookydonut Date: Tue, 21 Jan 2020 21:05:19 +0800 Subject: [PATCH] remove debugging prints --- src/dreamchecker/lib.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/dreamchecker/lib.rs b/src/dreamchecker/lib.rs index 6eafca41..f781f8d2 100644 --- a/src/dreamchecker/lib.rs +++ b/src/dreamchecker/lib.rs @@ -783,7 +783,6 @@ impl<'o, 's> AnalyzeProc<'o, 's> { return term // stop evaluating } let state = self.visit_statement(stmt.location, &stmt.elem); - //println!("{:#?} {:#?}", stmt, state); term.merge(state); } return term @@ -827,18 +826,15 @@ impl<'o, 's> AnalyzeProc<'o, 's> { return ControlFlow { returns: true, continues: false, breaks: false, fuzzy: false } }, Statement::Return(None) => { return ControlFlow { returns: true, continues: false, breaks: false, fuzzy: false } }, - Statement::Crash(expr) => { + Statement::Crash(expr) => { self.visit_expression(location, expr, None); return ControlFlow { returns: true, continues: false, breaks: false, fuzzy: false } }, Statement::Throw(expr) => { self.visit_expression(location, expr, None); }, Statement::While { condition, block } => { - //self.loop_condition_check(location, condition); self.visit_expression(location, condition, None); let mut state = self.visit_block(block); - //println!("end of while {:#?}", state); state.end_loop(); - //println!("after endloop {:#?}", state); return state }, Statement::DoWhile { block, condition } => { @@ -848,9 +844,8 @@ impl<'o, 's> AnalyzeProc<'o, 's> { .register(self.context); return state } - //self.loop_condition_check(location, condition); self.visit_expression(location, condition, None); - + state.end_loop(); return state }, @@ -865,7 +860,6 @@ impl<'o, 's> AnalyzeProc<'o, 's> { } self.visit_expression(condition.location, &condition.elem, None); let state = self.visit_block(block); - //println!("if arm {:#?}", state); match condition.elem.is_truthy() { Some(true) => { error(condition.location,"if condition is always true") @@ -879,7 +873,6 @@ impl<'o, 's> AnalyzeProc<'o, 's> { }, None => allterm.merge_false(state) }; - //println!("after merge {:#?}", allterm); } if let Some(else_arm) = else_arm { if alwaystrue { @@ -888,16 +881,12 @@ impl<'o, 's> AnalyzeProc<'o, 's> { .register(self.context); } let state = self.visit_block(else_arm); - //println!("else arm {:#?}", state); allterm.merge_false(state); - //println!("after merge {:#?}", allterm); } else { allterm.no_else(); return allterm } - //println!("end of if {:#?}", allterm); allterm.finalize(); - //println!("after finalize {:#?}", allterm); return allterm }, Statement::ForLoop { init, test, inc, block } => {