Ignore:
Timestamp:
Mar 3, 2016, 1:28:56 PM (10 years ago)
Author:
Aaron Moss <a3moss@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r9d7b3ea r36ebd03  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 27 22:03:12 2016
    13 // Update Count     : 225
     12// Last Modified On : Wed Mar  2 17:31:39 2016
     13// Update Count     : 226
    1414//
    1515
     
    101101                virtual void visit( StructInstType *structInst );
    102102                virtual void visit( UnionInstType *unionInst );
    103                 virtual void visit( ContextInstType *contextInst );
     103                virtual void visit( TraitInstType *contextInst );
    104104                virtual void visit( StructDecl *structDecl );
    105105                virtual void visit( UnionDecl *unionDecl );
     
    137137                virtual void visit( UnionDecl *structDecl );
    138138                virtual void visit( TypeDecl *typeDecl );
    139                 virtual void visit( ContextDecl *ctxDecl );
     139                virtual void visit( TraitDecl *ctxDecl );
    140140                virtual void visit( FunctionDecl *functionDecl );
    141141
     
    192192                virtual Declaration *mutate( UnionDecl * unionDecl );
    193193                virtual Declaration *mutate( EnumDecl * enumDecl );
    194                 virtual Declaration *mutate( ContextDecl * contextDecl );
     194                virtual Declaration *mutate( TraitDecl * contextDecl );
    195195
    196196                template<typename AggDecl>
     
    404404        }
    405405
    406         void Pass2::visit( ContextInstType *contextInst ) {
     406        void Pass2::visit( TraitInstType *contextInst ) {
    407407                Parent::visit( contextInst );
    408                 ContextDecl *ctx = indexer->lookupContext( contextInst->get_name() );
     408                TraitDecl *ctx = indexer->lookupTrait( contextInst->get_name() );
    409409                if ( ! ctx ) {
    410410                        throw SemanticError( "use of undeclared context " + contextInst->get_name() );
     
    412412                for ( std::list< TypeDecl * >::const_iterator i = ctx->get_parameters().begin(); i != ctx->get_parameters().end(); ++i ) {
    413413                        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 ) ) {
    415415                                        cloneAll( otherCtx->get_members(), contextInst->get_members() );
    416416                                } else {
     
    476476                        while ( ! toBeDone.empty() ) {
    477477                                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() ) ) {
    479479                                                for ( std::list< Declaration * >::const_iterator i = ctx->get_members().begin(); i != ctx->get_members().end(); ++i ) {
    480480                                                        DeclarationWithType *dwt = dynamic_cast< DeclarationWithType * >( *i );
     
    851851        }
    852852
    853         void AutogenerateRoutines::visit( ContextDecl *) {
     853        void AutogenerateRoutines::visit( TraitDecl *) {
    854854                // ensure that we don't add assignment ops for types defined as part of the context
    855855        }
     
    10751075        }
    10761076
    1077                 Declaration *EliminateTypedef::mutate( ContextDecl * contextDecl ) {
     1077                Declaration *EliminateTypedef::mutate( TraitDecl * contextDecl ) {
    10781078                Mutator::mutate( contextDecl );
    10791079                return handleAggregate( contextDecl );
Note: See TracChangeset for help on using the changeset viewer.