Changes in src/ResolvExpr/ConversionCost.h [e6b42e7:1d17939]
- File:
-
- 1 edited
-
src/ResolvExpr/ConversionCost.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.h
re6b42e7 r1d17939 72 72 73 73 // Some function pointer types, differ in return type. 74 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, bool,74 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, 75 75 const ast::SymbolTable &, const ast::TypeEnvironment &)>; 76 using PtrsCalculation = std::function<int(const ast::Type *, const ast::Type *,76 using NumCostCalculation = std::function<int(const ast::Type *, const ast::Type *, 77 77 const ast::SymbolTable &, const ast::TypeEnvironment &)>; 78 78 … … 81 81 protected: 82 82 const ast::Type * dst; 83 bool srcIsLvalue;84 83 const ast::SymbolTable & symtab; 85 84 const ast::TypeEnvironment & env; 86 85 CostCalculation costCalc; 87 86 public: 88 static size_t traceId;89 87 Cost cost; 90 Cost result() { return cost; }91 88 92 ConversionCost_new( const ast::Type * dst, bool srcIsLvalue,const ast::SymbolTable & symtab,89 ConversionCost_new( const ast::Type * dst, const ast::SymbolTable & symtab, 93 90 const ast::TypeEnvironment & env, CostCalculation costCalc ) : 94 dst( dst ), srcIsLvalue( srcIsLvalue ), symtab( symtab ), env( env ), 95 costCalc( costCalc ), cost( Cost::infinity ) 91 dst( dst ), symtab( symtab ), env( env ), costCalc( costCalc ), cost( Cost::infinity ) 96 92 {} 97 93 … … 114 110 115 111 Cost convertToReferenceCost( const ast::Type * src, const ast::ReferenceType * dest, 116 bool srcIsLvalue, const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, 117 PtrsCalculation func ); 112 const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, NumCostCalculation func ); 118 113 119 114 } // namespace ResolvExpr
Note:
See TracChangeset
for help on using the changeset viewer.