Changeset 21bdce2 for src/GenPoly
- Timestamp:
- May 21, 2018, 10:52:15 PM (7 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, with_gc
- Children:
- 2f0a0678
- Parents:
- b12c036 (diff), 1596726 (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
rb12c036 r21bdce2 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
rb12c036 r21bdce2 166 166 if ( isIntrinsicReference( appExpr ) ) { 167 167 // eliminate reference types from intrinsic applications - now they return lvalues 168 Type * result = appExpr->result;169 appExpr->result = result-> stripReferences()->clone();168 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result ); 169 appExpr->result = result->base->clone(); 170 170 appExpr->result->set_lvalue( true ); 171 171 if ( ! inIntrinsic ) { … … 183 183 void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) { 184 184 GuardValue( inIntrinsic ); 185 inIntrinsic = 185 inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic; 186 186 } 187 187 … … 403 403 ret = new AddressExpr( ret ); 404 404 } 405 if ( srcType->get_lvalue() && srcType->get_qualifiers() != strict_dynamic_cast<ReferenceType *>( destType )->base->get_qualifiers() ) {405 if ( srcType->get_lvalue() && ! ResolvExpr::typesCompatible( srcType, strict_dynamic_cast<ReferenceType *>( destType )->base, SymTab::Indexer() ) ) { 406 406 // must keep cast if cast-to type is different from the actual type 407 407 castExpr->arg = ret;
Note:
See TracChangeset
for help on using the changeset viewer.