Ignore:
Timestamp:
Nov 29, 2016, 3:30:59 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
8e5724e
Parents:
3a2128f (diff), 9129a84 (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 plg2:software/cfa/cfa-cc

Conflicts:

src/Parser/parser.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TypeSubstitution.cc

    r3a2128f r1f44196  
    7272Type *TypeSubstitution::lookup( std::string formalType ) const {
    7373        TypeEnvType::const_iterator i = typeEnv.find( formalType );
    74        
     74
    7575        // break on not in substitution set
    7676        if ( i == typeEnv.end() ) return 0;
    77        
     77
    7878        // attempt to transitively follow TypeInstType links.
    7979        while ( TypeInstType *actualType = dynamic_cast< TypeInstType* >( i->second ) ) {
    8080                const std::string& typeName = actualType->get_name();
    81                
     81
    8282                // break cycles in the transitive follow
    8383                if ( formalType == typeName ) break;
    84                
     84
    8585                // Look for the type this maps to, returning previous mapping if none-such
    8686                i = typeEnv.find( typeName );
    8787                if ( i == typeEnv.end() ) return actualType;
    8888        }
    89        
     89
    9090        // return type from substitution set
    9191        return i->second;
    92        
     92
    9393#if 0
    9494        if ( i == typeEnv.end() ) {
     
    149149        // bind type variables from forall-qualifiers
    150150        if ( freeOnly ) {
    151                 for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
     151                for ( Type::ForallList::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
    152152                        boundVars.insert( (*tyvar )->get_name() );
    153153                } // for
     
    163163        // bind type variables from forall-qualifiers
    164164        if ( freeOnly ) {
    165                 for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
     165                for ( Type::ForallList::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
    166166                        boundVars.insert( (*tyvar )->get_name() );
    167167                } // for
Note: See TracChangeset for help on using the changeset viewer.