Ignore:
Timestamp:
Aug 12, 2019, 1:47:37 PM (5 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
14388c1, e0bd0f9
Parents:
4f5a8a2
Message:

lvalue is now read through the expression.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.h

    r4f5a8a2 r7d01cf44  
    1010// Created On       : Sun May 17 09:37:28 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 24 10:00:00 2019
    13 // Update Count     : 5
     12// Last Modified On : Thu Aug  8 16:13:00 2019
     13// Update Count     : 6
    1414//
    1515
     
    3333        class TypeEnvironment;
    3434
    35         typedef std::function<Cost(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
     35        typedef std::function<Cost(const Type *, const Type *, bool,
     36                const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;
     37
    3638        struct ConversionCost : public WithShortCircuiting {
    3739          public:
    38                 ConversionCost( const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
     40                ConversionCost( const Type * dest, bool srcIsLvalue,
     41                        const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );
    3942
    4043                Cost get_cost() const { return cost; }
     
    5962          protected:
    6063                const Type * dest;
     64                bool srcIsLvalue;
    6165                const SymTab::Indexer &indexer;
    6266                Cost cost;
     
    6670
    6771        typedef std::function<int(const Type *, const Type *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction;
    68         Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
     72        Cost convertToReferenceCost( const Type * src, const ReferenceType * dest, bool srcIsLvalue,
     73                const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );
    6974
    7075// Some function pointer types, differ in return type.
Note: See TracChangeset for help on using the changeset viewer.