Changeset eba74ba for src/GenPoly
- Timestamp:
- May 25, 2018, 2:51:06 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- cdc4d43
- Parents:
- 3ef35bd (diff), 58e822a (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. - Location:
- src/GenPoly
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
r3ef35bd reba74ba 371 371 return is<VoidType>( ap->get_base() ) || is<VoidType>( bp->get_base() ) 372 372 || typesPolyCompatible( ap->get_base(), bp->get_base() ); 373 } else if ( aid == type_index{typeid(ReferenceType)} ) { 374 ReferenceType *ap = as<ReferenceType>(a), *bp = as<ReferenceType>(b); 375 return is<VoidType>( ap->get_base() ) || is<VoidType>( bp->get_base() ) 376 || typesPolyCompatible( ap->get_base(), bp->get_base() ); 373 377 } else if ( aid == type_index{typeid(ArrayType)} ) { 374 378 ArrayType *aa = as<ArrayType>(a), *ba = as<ArrayType>(b); -
src/GenPoly/Lvalue.cc
r3ef35bd reba74ba 165 165 if ( isIntrinsicReference( appExpr ) ) { 166 166 // eliminate reference types from intrinsic applications - now they return lvalues 167 Type * result = appExpr->result;168 appExpr->result = result-> stripReferences()->clone();167 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result ); 168 appExpr->result = result->base->clone(); 169 169 appExpr->result->set_lvalue( true ); 170 170 if ( ! inIntrinsic ) { … … 181 181 void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) { 182 182 GuardValue( inIntrinsic ); 183 inIntrinsic = 183 inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic; 184 184 } 185 185 … … 399 399 ret = new AddressExpr( ret ); 400 400 } 401 if ( srcType->get_lvalue() && srcType->get_qualifiers() != strict_dynamic_cast<ReferenceType *>( destType )->base->get_qualifiers() ) {401 if ( srcType->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) { 402 402 // must keep cast if cast-to type is different from the actual type 403 403 castExpr->arg = ret;
Note: See TracChangeset
for help on using the changeset viewer.