Changeset e67a82d for src/ResolvExpr/ConversionCost.h
- Timestamp:
- Aug 20, 2020, 11:48:15 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d685cb0
- Parents:
- 67ca73e (diff), 013b028 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.h
r67ca73e re67a82d 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; 88 90 89 ConversionCost_new( const ast::Type * dst, const ast::SymbolTable & symtab,91 ConversionCost_new( const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab, 90 92 const ast::TypeEnvironment & env, CostCalculation costCalc ) : 91 dst( dst ), symtab( symtab ), env( env ), costCalc( costCalc ), cost( Cost::infinity ) 93 dst( dst ), srcIsLvalue( srcIsLvalue ), symtab( symtab ), env( env ), 94 costCalc( costCalc ), cost( Cost::infinity ) 92 95 {} 93 96 … … 110 113 111 114 Cost convertToReferenceCost( const ast::Type * src, const ast::ReferenceType * dest, 112 const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, NumCostCalculation func ); 115 bool srcIsLvalue, const ast::SymbolTable & indexer, const ast::TypeEnvironment & env, 116 PtrsCalculation func ); 113 117 114 118 } // namespace ResolvExpr
Note:
See TracChangeset
for help on using the changeset viewer.