Changeset 6b224a52 for src/ResolvExpr/Unify.cc
- Timestamp:
- Aug 25, 2017, 12:11:53 PM (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, with_gc
- Children:
- bf7b9da7
- Parents:
- 135b431 (diff), f676b84 (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
-
src/ResolvExpr/Unify.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r135b431 r6b224a52 53 53 virtual void visit(PointerType *pointerType); 54 54 virtual void visit(ArrayType *arrayType); 55 virtual void visit(ReferenceType *refType); 55 56 virtual void visit(FunctionType *functionType); 56 57 virtual void visit(StructInstType *aggregateUseType); … … 153 154 154 155 bool bindVar( TypeInstType *typeInst, Type *other, const TypeDecl::Data & data, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ) { 156 // remove references from other, so that type variables can only bind to value types 157 other = other->stripReferences(); 155 158 OpenVarSet::const_iterator tyvar = openVars.find( typeInst->get_name() ); 156 159 assert( tyvar != openVars.end() ); … … 387 390 } // if 388 391 } else { 392 common = type1->clone(); 393 common->get_qualifiers() = tq1 | tq2; 389 394 result = true; 390 395 } // if … … 436 441 markAssertions( haveAssertions, needAssertions, pointerType ); 437 442 markAssertions( haveAssertions, needAssertions, otherPointer ); 443 } // if 444 } 445 446 void Unify::visit(ReferenceType *refType) { 447 if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) { 448 result = unifyExact( refType->get_base(), otherRef->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 449 markAssertions( haveAssertions, needAssertions, refType ); 450 markAssertions( haveAssertions, needAssertions, otherRef ); 438 451 } // if 439 452 }
Note:
See TracChangeset
for help on using the changeset viewer.