Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.h

    re6b42e7 r1d17939  
    7272
    7373// Some function pointer types, differ in return type.
    74 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, bool,
     74using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *,
    7575        const ast::SymbolTable &, const ast::TypeEnvironment &)>;
    76 using PtrsCalculation = std::function<int(const ast::Type *, const ast::Type *,
     76using NumCostCalculation = std::function<int(const ast::Type *, const ast::Type *,
    7777        const ast::SymbolTable &, const ast::TypeEnvironment &)>;
    7878
     
    8181protected:
    8282        const ast::Type * dst;
    83         bool srcIsLvalue;
    8483        const ast::SymbolTable & symtab;
    8584        const ast::TypeEnvironment & env;
    8685        CostCalculation costCalc;
    8786public:
    88         static size_t traceId;
    8987        Cost cost;
    90         Cost result() { return cost; }
    9188
    92         ConversionCost_new( const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab,
     89        ConversionCost_new( const ast::Type * dst, const ast::SymbolTable & symtab,
    9390                        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 )
    9692        {}
    9793
     
    114110
    115111Cost 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 );
    118113
    119114} // namespace ResolvExpr
Note: See TracChangeset for help on using the changeset viewer.