Changeset 5f95b5f for src/ResolvExpr
- Timestamp:
- Feb 6, 2018, 10:29:52 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, stuck-waitfor-destruct, with_gc
- Children:
- 69ce455
- Parents:
- 7323573 (diff), 6bfe5cc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/ResolvExpr
- Files:
-
- 3 edited
-
AdjustExprType.cc (modified) (3 diffs)
-
Resolver.cc (modified) (1 diff)
-
typeops.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AdjustExprType.cc
r7323573 r5f95b5f 24 24 class AdjustExprType : public WithShortCircuiting { 25 25 public: 26 AdjustExprType( const TypeEnvironment & env, const SymTab::Indexer &indexer );26 AdjustExprType( const TypeEnvironment & env, const SymTab::Indexer & indexer ); 27 27 void premutate( VoidType * ) { visit_children = false; } 28 28 void premutate( BasicType * ) { visit_children = false; } … … 45 45 46 46 private: 47 const TypeEnvironment & env;48 const SymTab::Indexer & indexer;47 const TypeEnvironment & env; 48 const SymTab::Indexer & indexer; 49 49 }; 50 50 … … 53 53 Type *newType = type->acceptMutator( adjuster ); 54 54 type = newType; 55 } 56 57 void adjustExprType( Type *& type ) { 58 TypeEnvironment env; 59 SymTab::Indexer indexer; 60 adjustExprType( type, env, indexer ); 55 61 } 56 62 -
src/ResolvExpr/Resolver.cc
r7323573 r5f95b5f 280 280 std::list< Statement * > newStmts; 281 281 resolveWithExprs( functionDecl->withExprs, newStmts ); 282 functionDecl->statements->kids.splice( functionDecl->statements->kids.begin(), newStmts ); 282 if ( functionDecl->statements ) { 283 functionDecl->statements->kids.splice( functionDecl->statements->kids.begin(), newStmts ); 284 } else { 285 assertf( functionDecl->withExprs.empty() && newStmts.empty(), "Function %s without a body has with-clause and/or generated with declarations.", functionDecl->name.c_str() ); 286 } 283 287 } 284 288 } -
src/ResolvExpr/typeops.h
r7323573 r5f95b5f 55 55 /// Replaces array types with the equivalent pointer, and function types with a pointer-to-function 56 56 void adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer ); 57 58 /// Replaces array types with the equivalent pointer, and function types with a pointer-to-function using empty TypeEnvironment and Indexer 59 void adjustExprType( Type *& type ); 57 60 58 61 template< typename ForwardIterator >
Note:
See TracChangeset
for help on using the changeset viewer.