Changeset ab904dc for src/Tuples
- Timestamp:
- Jun 1, 2017, 11:00:46 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 296b2be, 4a58895
- Parents:
- 7b15d7a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Tuples/TupleExpansion.cc ¶
r7b15d7a rab904dc 18 18 #include <cassert> 19 19 #include "Tuples.h" 20 #include "Common/PassVisitor.h" 21 #include "Common/ScopedMap.h" 20 22 #include "GenPoly/DeclMutator.h" 23 #include "InitTweak/GenInit.h" 24 #include "InitTweak/InitTweak.h" 25 #include "ResolvExpr/typeops.h" 26 #include "SymTab/Mangler.h" 27 #include "SynTree/Declaration.h" 28 #include "SynTree/Expression.h" 29 #include "SynTree/Initializer.h" 21 30 #include "SynTree/Mutator.h" 22 31 #include "SynTree/Statement.h" 23 #include "SynTree/Declaration.h"24 32 #include "SynTree/Type.h" 25 #include "SynTree/Expression.h"26 #include "SynTree/Initializer.h"27 #include "SymTab/Mangler.h"28 #include "Common/ScopedMap.h"29 #include "ResolvExpr/typeops.h"30 #include "InitTweak/GenInit.h"31 #include "InitTweak/InitTweak.h"32 33 33 34 namespace Tuples { … … 82 83 }; 83 84 84 class TupleIndexExpander final : public Mutator { 85 public: 86 typedef Mutator Parent; 87 using Parent::mutate; 88 89 virtual Expression * mutate( TupleIndexExpr * tupleExpr ) override; 85 class TupleIndexExpander { 86 public: 87 Expression * postmutate( TupleIndexExpr * tupleExpr ); 90 88 }; 91 89 … … 116 114 replacer.mutateDeclarationList( translationUnit ); 117 115 118 TupleIndexExpanderidxExpander;116 PassVisitor<TupleIndexExpander> idxExpander; 119 117 mutateAll( translationUnit, idxExpander ); 120 118 … … 250 248 } 251 249 252 Expression * TupleIndexExpander:: mutate( TupleIndexExpr * tupleExpr ) {253 Expression * tuple = maybeMutate( tupleExpr->get_tuple(), *this);250 Expression * TupleIndexExpander::postmutate( TupleIndexExpr * tupleExpr ) { 251 Expression * tuple = tupleExpr->get_tuple(); 254 252 assert( tuple ); 255 253 tupleExpr->set_tuple( nullptr );
Note: See TracChangeset
for help on using the changeset viewer.