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