Changeset 3315e3d
- Timestamp:
- Sep 4, 2019, 1:54:42 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3ce2425
- Parents:
- 7c8246d
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r7c8246d r3315e3d 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:27:10 2015 11 // Last Modified By : A aron B. Moss12 // Last Modified On : Mon Jun 18 11:58:00 201813 // Update Count : 4 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Sep 4 10:00:00 2019 13 // Update Count : 44 14 14 // 15 15 … … 278 278 #endif 279 279 if ( ( common = commonType( type1, type2, widen.first, widen.second, indexer, env, openVars ) ) ) { 280 common-> get_qualifiers() = tq1 | tq2;280 common->tq = tq1.unify( tq2 ); 281 281 #ifdef DEBUG 282 282 std::cerr << "unifyInexact: common type is "; … … 295 295 if ( ( tq1 > tq2 || widen.first ) && ( tq2 > tq1 || widen.second ) ) { 296 296 common = type1->clone(); 297 common-> get_qualifiers() = tq1 | tq2;297 common->tq = tq1.unify( tq2 ); 298 298 result = true; 299 299 } else { … … 302 302 } else { 303 303 common = type1->clone(); 304 common-> get_qualifiers() = tq1 | tq2;304 common->tq = tq1.unify( tq2 ); 305 305 result = true; 306 306 } // if -
src/SynTree/Type.h
r7c8246d r3315e3d 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Feb 14 17:11:24201913 // Update Count : 1 6911 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Sep 4 09:58:00 2019 13 // Update Count : 170 14 14 // 15 15 … … 131 131 bool operator>( Qualifiers other ) const { return *this != other && *this >= other; } 132 132 BFCommon( Qualifiers, NumTypeQualifier ) 133 134 Qualifiers unify( Qualifiers const & other ) const { 135 int or_flags = Mask & (val | other.val); 136 int and_flags = val & other.val; 137 return Qualifiers( or_flags | and_flags ); 138 } 133 139 }; // Qualifiers 134 140
Note: See TracChangeset
for help on using the changeset viewer.