Ignore:
Timestamp:
Aug 20, 2018, 3:03:20 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
efa8b6a
Parents:
f7d3215 (diff), ec91336 (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 'demangler'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/TypeEnvironment.cc

    rf7d3215 r72b3605  
    6969        }
    7070
    71         EqvClass::EqvClass( EqvClass &&other ) 
    72         : vars{std::move(other.vars)}, type{other.type}, 
     71        EqvClass::EqvClass( EqvClass &&other )
     72        : vars{std::move(other.vars)}, type{other.type},
    7373          allowWidening{std::move(other.allowWidening)}, data{std::move(other.data)} {
    7474                  other.type = nullptr;
     
    8585                if ( this == &other ) return *this;
    8686                delete type;
    87                
     87
    8888                vars = std::move(other.vars);
    8989                type = other.type;
     
    132132                        ++next;
    133133                        std::set<std::string> intersection;
    134                         std::set_intersection( i->vars.begin(), i->vars.end(), eqvClass.vars.begin(), eqvClass.vars.end(), 
     134                        std::set_intersection( i->vars.begin(), i->vars.end(), eqvClass.vars.begin(), eqvClass.vars.end(),
    135135                                std::inserter( intersection, intersection.begin() ) );
    136136                        if ( ! intersection.empty() ) { env.erase( i ); }
     
    240240                        // ttype unifies with any tuple type
    241241                        return dynamic_cast< TupleType * >( type ) || Tuples::isTtype( type );
     242                  default:
     243                        assertf(false, "Unhandled tyvar kind: %d", data.kind);
    242244                } // switch
    243245                return false;
     
    245247
    246248        bool TypeEnvironment::bindVar( TypeInstType *typeInst, Type *bindTo, const TypeDecl::Data & data, AssertionSet &need, AssertionSet &have, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ) {
    247                
     249
    248250                // remove references from other, so that type variables can only bind to value types
    249251                bindTo = bindTo->stripReferences();
     
    291293                auto class1 = internal_lookup( var1->get_name() );
    292294                auto class2 = internal_lookup( var2->get_name() );
    293                
     295
    294296                // exit early if variables already bound together
    295297                if ( class1 != env.end() && class1 == class2 ) {
Note: See TracChangeset for help on using the changeset viewer.