Skip to content

Commit

Permalink
Remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jul 2, 2021
1 parent 5276569 commit 899c925
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 150 deletions.
138 changes: 0 additions & 138 deletions examples/test.sol

This file was deleted.

12 changes: 0 additions & 12 deletions src/sema/unused_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ pub fn assigned_variable(ns: &mut Namespace, exp: &Expression, symtable: &mut Sy

Expression::StorageVariable(_, _, contract_no, offset) => {
ns.contracts[*contract_no].variables[*offset].assigned = true;
//TODO: Remove this when ready
//std::println!("Storage variable '{}' assigned", ns.contracts[*contract_no].variables[*offset].name);
}

Expression::Variable(_, _, offset) => {
let var = symtable.vars.get_mut(offset).unwrap();
(*var).assigned = true;
//TODO: Remove this when ready
//std::println!("Variable '{}' assigned", (*var).id.name);
}

Expression::StructMember(_, _, str, _) => {
Expand All @@ -46,27 +42,19 @@ pub fn used_variable(ns: &mut Namespace, exp: &Expression, symtable: &mut Symtab
match &exp {
Expression::StorageVariable(_, _, contract_no, offset) => {
ns.contracts[*contract_no].variables[*offset].read = true;
//TODO: Remove this when ready
//std::println!("Storage variable '{}' read", ns.contracts[*contract_no].variables[*offset].name);
}

Expression::Variable(_, _, offset) => {
let var = symtable.vars.get_mut(offset).unwrap();
(*var).read = true;
//TODO: Remove this when ready
//std::println!("Variable '{}' read", var.id.name);
}

Expression::ConstantVariable(_, _, Some(contract_no), offset) => {
ns.contracts[*contract_no].variables[*offset].read = true;
//TODO: Remove this when ready
//std::println!("Constant variable '{}' read", ns.contracts[*contract_no].variables[*offset].name);
}

Expression::ConstantVariable(_, _, None, offset) => {
ns.constants[*offset].read = true;
//TODO: Remove this when ready
//std::println!("Outside contract constant variable '{}' read", ns.constants[*offset].name);
}

Expression::ZeroExt(_, _, variable) => {
Expand Down

0 comments on commit 899c925

Please sign in to comment.