- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.h
r7d01cf44 rcf32116 10 10 // Created On : Sun May 17 09:37:28 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T hu Aug 8 16:13:00 201913 // Update Count : 612 // Last Modified On : Tue Oct 4 14:59:00 2019 13 // Update Count : 7 14 14 // 15 15 … … 74 74 75 75 // Some function pointer types, differ in return type. 76 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, 76 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, bool, 77 77 const ast::SymbolTable &, const ast::TypeEnvironment &)>; 78 using NumCostCalculation = std::function<int(const ast::Type *, const ast::Type *,78 using PtrsCalculation = std::function<int(const ast::Type *, const ast::Type *, 79 79 const ast::SymbolTable &, const ast::TypeEnvironment &)>; 80 80 … … 83 83 protected: 84 84 const ast::Type * dst; 85 bool srcIsLvalue; 85 86 const ast::SymbolTable & symtab; 86 87 const ast::TypeEnvironment & env; … … 89 90 Cost cost; 90 91 91 ConversionCost_new( const ast::Type * dst, const ast::SymbolTable & symtab,92 ConversionCost_new( const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab, 92 93 const ast::TypeEnvironment & env, CostCalculation costCalc ) : 93 dst( dst ), symtab( symtab ), env( env ), costCalc( costCalc ), cost( Cost::infinity ) 94 dst( dst ), srcIsLvalue( srcIsLvalue ), symtab( symtab ), env( env ), 95 costCalc( costCalc ), cost( Cost::infinity ) 94 96 {} 95 97 … … 114 116 115 117 Cost convertToReferenceCost( const ast::Type * src, const ast::ReferenceType * dest, 116 const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, NumCostCalculation func ); 118 bool srcIsLvalue, const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, 119 PtrsCalculation func ); 117 120 118 121 } // namespace ResolvExpr
Note:
See TracChangeset
for help on using the changeset viewer.