# HG changeset patch # User mjsousa # Date 1419586758 0 # Node ID 0ede7ca157e260bf00b9eeb817b91d85a83774ee # Parent 706a152731abcb15193445699c01a26698c2d087 Remove debugging code left in by mistake. diff -r 706a152731ab -r 0ede7ca157e2 stage3/array_range_check.cc --- a/stage3/array_range_check.cc Fri Dec 26 08:09:34 2014 +0000 +++ b/stage3/array_range_check.cc Fri Dec 26 09:39:18 2014 +0000 @@ -216,7 +216,7 @@ if (dimension < lower_ull) STAGE3_ERROR(0, symbol, symbol, "Number of elements in array subrange exceeds maximum number of elements (%llu).", std::numeric_limits< unsigned long long int >::max()); } - } else {debug_c::print_ast(symbol);ERROR;} + } else {ERROR;} /* correct value for dimension is actually ---> dimension = upper_limit - lower_limit + 1 * Up to now, we have only determined dimension = upper_limit - lower_limit diff -r 706a152731ab -r 0ede7ca157e2 stage3/constant_folding.cc --- a/stage3/constant_folding.cc Fri Dec 26 08:09:34 2014 +0000 +++ b/stage3/constant_folding.cc Fri Dec 26 09:39:18 2014 +0000 @@ -1045,7 +1045,7 @@ void *constant_folding_c::handle_var_list_decl(symbol_c *var_list, symbol_c *type_decl) { type_decl->accept(*this); // Do constant folding of the initial value, and literals in subranges! (we will probably be doing this multiple times for the same init value, but this is safe as the cvalue is idem-potent) symbol_c *init_value = type_initial_value_c::get(type_decl); - if (NULL == init_value) {debug_c::print(type_decl); return NULL;} // this is probably a FB datatype, for which no initial value exists! Do nothing and return. + if (NULL == init_value) {return NULL;} // this is probably a FB datatype, for which no initial value exists! Do nothing and return. init_value->accept(*this); // necessary when handling default initial values, that were not constant folded in the call type_decl->accept(*this) list_c *list = dynamic_cast(var_list); @@ -1328,7 +1328,7 @@ /* VAR_TEMP temp_var_decl_list END_VAR */ // SYM_REF1(temp_var_decls_c, var_decl_list) -void *constant_folding_c::visit(temp_var_decls_c *symbol) {debug_c::print(symbol); return handle_var_decl(symbol->var_decl_list, true);} +void *constant_folding_c::visit(temp_var_decls_c *symbol) {return handle_var_decl(symbol->var_decl_list, true);} /* intermediate helper symbol for temp_var_decls */ // SYM_LIST(temp_var_decls_list_c) @@ -1336,7 +1336,7 @@ /* VAR NON_RETAIN var_init_decl_list END_VAR */ // SYM_REF1(non_retentive_var_decls_c, var_decl_list) // NOTE: non_retentive_var_decls_c is only used inside FBs and Programs, so it is safe to call with fixed_init_value_ = false -void *constant_folding_c::visit(non_retentive_var_decls_c *symbol) {debug_c::print(symbol); return handle_var_decl(symbol->var_decl_list, false);} +void *constant_folding_c::visit(non_retentive_var_decls_c *symbol) {return handle_var_decl(symbol->var_decl_list, false);} /**********************/