Skip to content

Commit

Permalink
remove debugging prints
Browse files Browse the repository at this point in the history
  • Loading branch information
spookydonut committed Jan 21, 2020
1 parent 9456c3b commit cb5085b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/dreamchecker/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 } => {
Expand All @@ -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
},
Expand All @@ -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")
Expand All @@ -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 {
Expand All @@ -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 } => {
Expand Down

0 comments on commit cb5085b

Please sign in to comment.