Changeset 36ebd03 for src/SymTab/Validate.cc
- Timestamp:
- Mar 3, 2016, 1:28:56 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 3627356
- Parents:
- 9d7b3ea (diff), 4040425 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r9d7b3ea r36ebd03 10 10 // Created On : Sun May 17 21:50:04 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 27 22:03:12201613 // Update Count : 22 512 // Last Modified On : Wed Mar 2 17:31:39 2016 13 // Update Count : 226 14 14 // 15 15 … … 101 101 virtual void visit( StructInstType *structInst ); 102 102 virtual void visit( UnionInstType *unionInst ); 103 virtual void visit( ContextInstType *contextInst );103 virtual void visit( TraitInstType *contextInst ); 104 104 virtual void visit( StructDecl *structDecl ); 105 105 virtual void visit( UnionDecl *unionDecl ); … … 137 137 virtual void visit( UnionDecl *structDecl ); 138 138 virtual void visit( TypeDecl *typeDecl ); 139 virtual void visit( ContextDecl *ctxDecl );139 virtual void visit( TraitDecl *ctxDecl ); 140 140 virtual void visit( FunctionDecl *functionDecl ); 141 141 … … 192 192 virtual Declaration *mutate( UnionDecl * unionDecl ); 193 193 virtual Declaration *mutate( EnumDecl * enumDecl ); 194 virtual Declaration *mutate( ContextDecl * contextDecl );194 virtual Declaration *mutate( TraitDecl * contextDecl ); 195 195 196 196 template<typename AggDecl> … … 404 404 } 405 405 406 void Pass2::visit( ContextInstType *contextInst ) {406 void Pass2::visit( TraitInstType *contextInst ) { 407 407 Parent::visit( contextInst ); 408 ContextDecl *ctx = indexer->lookupContext( contextInst->get_name() );408 TraitDecl *ctx = indexer->lookupTrait( contextInst->get_name() ); 409 409 if ( ! ctx ) { 410 410 throw SemanticError( "use of undeclared context " + contextInst->get_name() ); … … 412 412 for ( std::list< TypeDecl * >::const_iterator i = ctx->get_parameters().begin(); i != ctx->get_parameters().end(); ++i ) { 413 413 for ( std::list< DeclarationWithType * >::const_iterator assert = (*i )->get_assertions().begin(); assert != (*i )->get_assertions().end(); ++assert ) { 414 if ( ContextInstType *otherCtx = dynamic_cast< ContextInstType * >(*assert ) ) {414 if ( TraitInstType *otherCtx = dynamic_cast< TraitInstType * >(*assert ) ) { 415 415 cloneAll( otherCtx->get_members(), contextInst->get_members() ); 416 416 } else { … … 476 476 while ( ! toBeDone.empty() ) { 477 477 for ( std::list< DeclarationWithType * >::iterator assertion = toBeDone.begin(); assertion != toBeDone.end(); ++assertion ) { 478 if ( ContextInstType *ctx = dynamic_cast< ContextInstType * >( (*assertion )->get_type() ) ) {478 if ( TraitInstType *ctx = dynamic_cast< TraitInstType * >( (*assertion )->get_type() ) ) { 479 479 for ( std::list< Declaration * >::const_iterator i = ctx->get_members().begin(); i != ctx->get_members().end(); ++i ) { 480 480 DeclarationWithType *dwt = dynamic_cast< DeclarationWithType * >( *i ); … … 851 851 } 852 852 853 void AutogenerateRoutines::visit( ContextDecl *) {853 void AutogenerateRoutines::visit( TraitDecl *) { 854 854 // ensure that we don't add assignment ops for types defined as part of the context 855 855 } … … 1075 1075 } 1076 1076 1077 Declaration *EliminateTypedef::mutate( ContextDecl * contextDecl ) {1077 Declaration *EliminateTypedef::mutate( TraitDecl * contextDecl ) { 1078 1078 Mutator::mutate( contextDecl ); 1079 1079 return handleAggregate( contextDecl );
Note:
See TracChangeset
for help on using the changeset viewer.