// // 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. // // AssignExpand.cc -- // // Author : Rodolfo G. Esteves // Created On : Mon May 18 07:44:20 2015 // Last Modified By : Peter A. Buhr // Last Modified On : Sat Jun 13 08:16:39 2015 // Update Count : 4 // #include #include #include #include #include #include "AssignExpand.h" #include "Parser/ParseNode.h" #include "SynTree/Type.h" #include "SynTree/Declaration.h" #include "SynTree/Expression.h" #include "SynTree/Statement.h" namespace Tuples { AssignExpander::AssignExpander() : temporaryNamer("__tpl") {} Statement *AssignExpander::mutate( ExprStmt *exprStmt ) { replace.clear(); extra.clear(); extra2.clear(); exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) ); CompoundStmt *newSt = 0; if ( ! extra.empty() ) { if ( ! newSt ) newSt= new CompoundStmt(std::list