Changeset eb50842
- Timestamp:
- Jun 26, 2015, 1:43:41 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:
- 937e51d
- Parents:
- 0f19d763
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified .gitignore ¶
r0f19d763 reb50842 1 # build files 2 *.[ado] 3 4 # generated by configure 1 5 Makefile 2 autom4te.cache/ 6 aclocal.m4 7 autom4te.cache 3 8 config.h 9 config.status 4 10 config.log 5 config.status 11 stamp-h1 6 12 driver/Makefile 13 libcfa/Makefile 14 src/Makefile 15 16 # build directories 17 bin 18 lib 19 20 # src executables, for lib and bin 7 21 driver/cc1 8 driver/cc1.o9 22 driver/cfa 10 driver/cfa.o 11 libcfa/Makefile 12 libcfa/builtins.c 13 libcfa/builtins.cf 23 src/cfa-cpp 14 24 libcfa/libcfa-prelude.c 15 libcfa/libcfa-prelude.o 16 libcfa/libcfa.a 17 src/*/*.d 18 src/*/*.o 19 src/MakeLibCfa.d 20 src/MakeLibCfa.o 25 26 # generated by bison and lex from cfa.y and lex.l, respectively 21 27 src/Parser/cfa.output 22 28 src/Parser/cfa.tab.cc 23 29 src/Parser/cfa.tab.h 24 30 src/Parser/lex.yy.cc 25 src/cfa-cpp26 src/main.d27 src/main.o28 stamp-h1 -
TabularUnified src/ResolvExpr/FindOpenVars.h ¶
r0f19d763 reb50842 21 21 22 22 namespace ResolvExpr { 23 // Updates open and closed variables and their associated assertions 23 24 void findOpenVars( Type *type, OpenVarSet &openVars, OpenVarSet &closedVars, AssertionSet &needAssertions, AssertionSet &haveAssertions, bool firstIsOpen ); 24 25 } // namespace ResolvExpr -
TabularUnified src/ResolvExpr/Unify.cc ¶
r0f19d763 reb50842 73 73 }; 74 74 75 /// Attempts an inexact unification of type1 and type2. 76 /// Returns false if no such unification; if the types can be unified, sets common (unless they unify exactly and have identical type qualifiers) 75 77 bool unifyInexact( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer, Type *&common ); 76 78 bool unifyExact( Type *type1, Type *type2, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ); … … 148 150 if ( curClass.type ) { 149 151 Type *common = 0; 152 // attempt to unify equivalence class type (which has qualifiers stripped, so they must be restored) with the type to bind to 150 153 std::auto_ptr< Type > newType( curClass.type->clone() ); 154 newType->get_qualifiers() = typeInst->get_qualifiers(); 151 155 if ( unifyInexact( newType.get(), other, env, needAssertions, haveAssertions, openVars, widenMode & WidenMode( curClass.allowWidening, true ), indexer, common ) ) { 152 156 if ( common ) { … … 279 283 TypeEnvironment debugEnv( env ); 280 284 #endif 285 if ( type1->get_qualifiers() != type2->get_qualifiers() ) { 286 return false; 287 } 288 281 289 bool result; 282 290 TypeInstType *var1 = dynamic_cast< TypeInstType* >( type1 ); … … 291 299 bool isopen1 = var1 && ( entry1 != openVars.end() ); 292 300 bool isopen2 = var2 && ( entry2 != openVars.end() ); 293 if ( type1->get_qualifiers() != type2->get_qualifiers() ) { 294 return false; 295 } else if ( isopen1 && isopen2 && entry1->second == entry2->second ) { 301 302 if ( isopen1 && isopen2 && entry1->second == entry2->second ) { 296 303 result = bindVarToVar( var1, var2, entry1->second, env, needAssertions, haveAssertions, openVars, widenMode, indexer ); 297 304 } else if ( isopen1 ) {
Note: See TracChangeset
for help on using the changeset viewer.