Changeset fc638d2
- Timestamp:
- Dec 13, 2016, 4:13:08 PM (6 years ago)
- Branches:
- aaron-thesis, arm-eh, 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:
- 7933351
- Parents:
- f7e749f
- Location:
- src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rf7e749f rfc638d2 281 281 } // if 282 282 output << " }"; 283 } 284 285 void CodeGenerator::visit( ConstructorInit * init ){ 286 assertf( false, "ConstructorInit nodes should not make it to CodeGen." ); 283 287 } 284 288 -
src/CodeGen/CodeGenerator.h
rf7e749f rfc638d2 47 47 virtual void visit( SingleInit * ); 48 48 virtual void visit( ListInit * ); 49 virtual void visit( ConstructorInit * ); 49 50 50 51 //*** Constant -
src/GenPoly/CopyParams.cc
rf7e749f rfc638d2 38 38 }; 39 39 40 /// creates local copies of polymorphic function parameters 40 41 void copyParams( std::list< Declaration* > &translationUnit ) { 41 42 CopyParams copier; … … 53 54 if ( ! modVars.empty() ) { 54 55 std::map< std::string, DeclarationWithType* > assignOps; 56 // xxx - this needs to use constructors, not assignment operators 55 57 // assume the assignment operator is the first assert param after any "type" parameter 56 58 for ( Type::ForallList::const_iterator tyVar = funcDecl->get_functionType()->get_forall().begin(); tyVar != funcDecl->get_functionType()->get_forall().end(); ++tyVar ) { -
src/GenPoly/PolyMutator.cc
rf7e749f rfc638d2 149 149 ValueGuard< std::list< Statement* > > oldStmtsToAdd( stmtsToAdd ); 150 150 ValueGuard< std::list< Statement* > > oldStmtsToAddAfter( stmtsToAddAfter ); 151 ValueGuard< TypeSubstitution * > oldEnv( env ); 151 152 152 // xxx - not sure if these are needed, along with appropriate assignments, but I don't think so... 153 // ValueGuard< TyVarMap > oldScopeTyVars; 154 // ValueGuard< TypeSubstitution * > oldEnv; 153 // xxx - not sure if this is needed, along with appropriate reset, but I don't think so... 154 // ValueGuard< TyVarMap > oldScopeTyVars( scopeTyVars ); 155 155 156 156 stmtsToAdd.clear(); 157 157 stmtsToAddAfter.clear(); 158 // scopeTyVars.clear(); 158 159 159 stmtExpr->set_result( maybeMutate( stmtExpr->get_result(), *this ) ); 160 stmtExpr->set_statements( maybeMutate( stmtExpr->get_statements(), *this ) ); 161 return stmtExpr; 160 return Parent::mutate( stmtExpr ); 162 161 } 163 162 -
src/ResolvExpr/TypeEnvironment.cc
rf7e749f rfc638d2 32 32 // 33 33 // I've seen a TU go from 54 minutes to 1 minute 34 seconds with the addition of this comparator. 34 bool AssertCompare::operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) {34 bool AssertCompare::operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const { 35 35 // Objects are always less than functions 36 36 if ( ObjectDecl * objectDecl1 = dynamic_cast< ObjectDecl * >( d1 ) ) { -
src/ResolvExpr/TypeEnvironment.h
rf7e749f rfc638d2 29 29 namespace ResolvExpr { 30 30 struct AssertCompare { 31 bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) ;31 bool operator()( DeclarationWithType * d1, DeclarationWithType * d2 ) const; 32 32 }; 33 33 typedef std::map< DeclarationWithType*, bool, AssertCompare > AssertionSet; -
src/SymTab/Indexer.h
rf7e749f rfc638d2 25 25 class Indexer : public Visitor { 26 26 public: 27 Indexer( bool useDebug = false );27 explicit Indexer( bool useDebug = false ); 28 28 29 29 Indexer( const Indexer &that ); -
src/SynTree/CompoundStmt.cc
rf7e749f rfc638d2 49 49 Statement * origStmt = *origit++; 50 50 if ( DeclStmt * declStmt = dynamic_cast< DeclStmt * >( s ) ) { 51 DeclStmt * origDeclStmt = dynamic_cast< DeclStmt * >( origStmt ); 52 assert( origDeclStmt ); 51 DeclStmt * origDeclStmt = safe_dynamic_cast< DeclStmt * >( origStmt ); 53 52 if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * > ( declStmt->get_decl() ) ) { 54 DeclarationWithType * origdwt = dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ); 55 assert( origdwt ); 53 DeclarationWithType * origdwt = safe_dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ); 56 54 assert( dwt->get_name() == origdwt->get_name() ); 57 55 declMap[ origdwt ] = dwt; 58 } 59 } 56 } else assert( ! dynamic_cast< DeclarationWithType * > ( origDeclStmt->get_decl() ) ); 57 } else assert( ! dynamic_cast< DeclStmt * > ( s ) ); 60 58 } 61 59 if ( ! declMap.empty() ) { -
src/SynTree/Initializer.cc
rf7e749f rfc638d2 65 65 } 66 66 67 ListInit::ListInit( const ListInit & other ) : Initializer( other ) { 68 cloneAll( other.initializers, initializers ); 69 cloneAll( other.designators, designators ); 70 } 71 72 67 73 ListInit::~ListInit() { 68 74 deleteAll( initializers ); -
src/SynTree/Initializer.h
rf7e749f rfc638d2 88 88 ListInit( const std::list<Initializer*> &initializers, 89 89 const std::list<Expression *> &designators = std::list< Expression * >(), bool maybeConstructed = false ); 90 ListInit( const ListInit & other ); 90 91 virtual ~ListInit(); 91 92 -
src/SynTree/VarExprReplacer.cc
rf7e749f rfc638d2 21 21 // replace variable with new node from decl map 22 22 void VarExprReplacer::visit( VariableExpr * varExpr ) { 23 // xxx - assertions and parameters aren't accounted for in this... (i.e. they aren't inserted into the map when it's made, only DeclStmts are) 23 24 if ( declMap.count( varExpr->get_var() ) ) { 24 25 varExpr->set_var( declMap.at( varExpr->get_var() ) );
Note: See TracChangeset
for help on using the changeset viewer.