Changeset e6b42e7 for src/ResolvExpr
- Timestamp:
- Sep 9, 2020, 11:33:01 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2b7f6f0
- Parents:
- dfc13bb
- Location:
- src/ResolvExpr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.cc
rdfc13bb re6b42e7 520 520 return convertToReferenceCost( src, refType, srcIsLvalue, symtab, env, localPtrsAssignable ); 521 521 } else { 522 ast::Pass<ConversionCost_new> converter( dst, srcIsLvalue, symtab, env, localConversionCost ); 523 src->accept( converter ); 524 return converter.core.cost; 522 return ast::Pass<ConversionCost_new>::read( src, dst, srcIsLvalue, symtab, env, localConversionCost ); 525 523 } 526 524 } … … 563 561 } 564 562 } else { 565 ast::Pass<ConversionCost_new> converter( dst, srcIsLvalue, symtab, env, localConversionCost ); 566 src->accept( converter ); 567 return converter.core.cost; 563 return ast::Pass<ConversionCost_new>::read( src, dst, srcIsLvalue, symtab, env, localConversionCost ); 568 564 } 569 565 } else { -
src/ResolvExpr/ConversionCost.h
rdfc13bb re6b42e7 88 88 static size_t traceId; 89 89 Cost cost; 90 Cost result() { return cost; } 90 91 91 92 ConversionCost_new( const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab, -
src/ResolvExpr/Resolver.cc
rdfc13bb re6b42e7 965 965 /// Finds deleted expressions in an expression tree 966 966 struct DeleteFinder_new final : public ast::WithShortCircuiting { 967 const ast::DeletedExpr * delExpr= nullptr;967 const ast::DeletedExpr * result = nullptr; 968 968 969 969 void previsit( const ast::DeletedExpr * expr ) { 970 if ( delExpr) { visit_children = false; }971 else { delExpr= expr; }970 if ( result ) { visit_children = false; } 971 else { result = expr; } 972 972 } 973 973 974 974 void previsit( const ast::Expr * ) { 975 if ( delExpr) { visit_children = false; }975 if ( result ) { visit_children = false; } 976 976 } 977 977 }; … … 980 980 /// Check if this expression is or includes a deleted expression 981 981 const ast::DeletedExpr * findDeletedExpr( const ast::Expr * expr ) { 982 ast::Pass<DeleteFinder_new> finder; 983 expr->accept( finder ); 984 return finder.core.delExpr; 982 return ast::Pass<DeleteFinder_new>::read( expr ); 985 983 } 986 984
Note: See TracChangeset
for help on using the changeset viewer.