// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // MLEMutator.cc -- // // Author : Rodolfo G. Esteves // Created On : Mon May 18 07:44:20 2015 // Last Modified By : Rob Schluntz // Last Modified On : Wed May 27 16:19:32 2015 // Update Count : 44 // #include #include #include "MLEMutator.h" #include "SynTree/Statement.h" namespace ControlStruct { MLEMutator::~MLEMutator() { delete targetTable; targetTable = 0; } CompoundStmt* MLEMutator::mutate( CompoundStmt *cmpndStmt ) { bool labeledBlock = false; if ( !(cmpndStmt->get_labels().empty()) ) { labeledBlock = true; enclosingBlocks.push_back( Entry( cmpndStmt ) ); } // if std::list< Statement * > &kids = cmpndStmt->get_kids(); for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) { *k = (*k)->acceptMutator(*this); if ( ! get_breakLabel().empty() ) { std::list< Statement * >::iterator next = k; next++; if ( next == kids.end() ) { std::list