Ignore:
Timestamp:
Aug 20, 2020, 11:48:15 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.h

    r67ca73e re67a82d  
    7272
    7373// Some function pointer types, differ in return type.
    74 using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *,
     74using CostCalculation = std::function<Cost(const ast::Type *, const ast::Type *, bool,
    7575        const ast::SymbolTable &, const ast::TypeEnvironment &)>;
    76 using NumCostCalculation = std::function<int(const ast::Type *, const ast::Type *,
     76using PtrsCalculation = 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;
    8384        const ast::SymbolTable & symtab;
    8485        const ast::TypeEnvironment & env;
    8586        CostCalculation costCalc;
    8687public:
     88        static size_t traceId;
    8789        Cost cost;
    8890
    89         ConversionCost_new( const ast::Type * dst, const ast::SymbolTable & symtab,
     91        ConversionCost_new( const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab,
    9092                        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 )
    9295        {}
    9396
     
    110113
    111114Cost 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 );
    113117
    114118} // namespace ResolvExpr
Note: See TracChangeset for help on using the changeset viewer.