Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for bad C++ code generation #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/DiNo/cpp_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,11 +1982,11 @@ const char *procdecl::generate_decl()
for (stmt * sttt = body; sttt != NULL; sttt = sttt->next) {

// std::cout << "\nPLUS == " << sttt->get_proc_code_plus() << std::endl;
sttt->get_proc_code_plus();
//sttt->get_proc_code_plus();
pplus.append(sttt->get_proc_code_plus());

// std::cout << "\nMINUS == " << sttt->get_proc_code_minus() << std::endl;
sttt->get_proc_code_minus();
//sttt->get_proc_code_minus();
pminus.append(sttt->get_proc_code_minus());

}
Expand Down Expand Up @@ -5602,15 +5602,15 @@ void make_print_world(ste * globals)
std::map< std::string, std::vector< std::pair< std::pair<std::string, std::string>, std::pair<int, int> > > >::iterator ip_minus;
for (ip_minus = processes_minus.begin(); ip_minus != processes_minus.end(); ++ip_minus){

// std::cout << "\nLOOOOPING: \n" << (*ip).first << " ( ";
// for (int ii = 0; ii < (*ip).second.size(); ii++){
// std::cout << (*ip).second.at(ii).first.first << " " << (*ip).second.at(ii).first.second <<
// "( " << (*ip).second.at(ii).second.first << "," << (*ip).second.at(ii).second.second << "), ";
//
// }
// std::cout << " ) " << std::endl;
// std::cout << "\nLOOOOPING: \n" << (*ip_minus).first << " ( ";
// for (int ii = 0; ii < (*ip_minus).second.size(); ii++){
// std::cout << (*ip_minus).second.at(ii).first.first << " " << (*ip_minus).second.at(ii).first.second <<
// "( " << (*ip_minus).second.at(ii).second.first << "," << (*ip_minus).second.at(ii).second.second << "), ";
//
// }
// std::cout << " ) " << std::endl;

// std::cout << "\nLOOOOPING: \n" << (*ip).first << " ( ";
//std::cout << "\nLOOOOPING: \n" << (*ip).first << " ( ";

if ((*ip_minus).first.size() > 1){

Expand Down Expand Up @@ -6866,7 +6866,7 @@ const char *program::generate_code()
fprintf(codefile, "#define DISCRETIZATION %lf\n", discretization);
#if defined(VAL_PATHNAME)
fprintf(codefile, "#define VAL_PATHNAME \"%s\"\n", QUOTED_VALUE(VAL_PATHNAME));
#endif
#endif
fprintf(codefile, "#define BITS_IN_WORLD %d\n", bits_in_world);
if (args->no_compression)
fprintf(codefile, "#define ALIGN\n");
Expand Down Expand Up @@ -7019,4 +7019,3 @@ const char *program::generate_code()

return "ERROR!";
}