Changes in src/ResolvExpr/ConversionCost.h [7870799:3c89751]
- File:
-
- 1 edited
-
src/ResolvExpr/ConversionCost.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/ConversionCost.h
r7870799 r3c89751 33 33 class TypeEnvironment; 34 34 35 typedef std::function<Cost( const Type *, constType *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction;35 typedef std::function<Cost(Type *, Type *, const SymTab::Indexer &, const TypeEnvironment &)> CostFunction; 36 36 struct ConversionCost : public WithShortCircuiting { 37 37 public: 38 ConversionCost( const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction );38 ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env, CostFunction ); 39 39 40 40 Cost get_cost() const { return cost; } 41 41 42 void previsit( constBaseSyntaxNode * ) { visit_children = false; }42 void previsit( BaseSyntaxNode * ) { visit_children = false; } 43 43 44 void postvisit( constVoidType * voidType );45 void postvisit( constBasicType * basicType );46 void postvisit( constPointerType * pointerType );47 void postvisit( constArrayType * arrayType );48 void postvisit( constReferenceType * refType );49 void postvisit( constFunctionType * functionType );50 void postvisit( constStructInstType * aggregateUseType );51 void postvisit( constUnionInstType * aggregateUseType );52 void postvisit( constEnumInstType * aggregateUseType );53 void postvisit( constTraitInstType * aggregateUseType );54 void postvisit( constTypeInstType * aggregateUseType );55 void postvisit( constTupleType * tupleType );56 void postvisit( constVarArgsType * varArgsType );57 void postvisit( constZeroType * zeroType );58 void postvisit( constOneType * oneType );44 void postvisit( VoidType * voidType ); 45 void postvisit( BasicType * basicType ); 46 void postvisit( PointerType * pointerType ); 47 void postvisit( ArrayType * arrayType ); 48 void postvisit( ReferenceType * refType ); 49 void postvisit( FunctionType * functionType ); 50 void postvisit( StructInstType * aggregateUseType ); 51 void postvisit( UnionInstType * aggregateUseType ); 52 void postvisit( EnumInstType * aggregateUseType ); 53 void postvisit( TraitInstType * aggregateUseType ); 54 void postvisit( TypeInstType * aggregateUseType ); 55 void postvisit( TupleType * tupleType ); 56 void postvisit( VarArgsType * varArgsType ); 57 void postvisit( ZeroType * zeroType ); 58 void postvisit( OneType * oneType ); 59 59 protected: 60 const Type *dest;60 Type *dest; 61 61 const SymTab::Indexer &indexer; 62 62 Cost cost; … … 65 65 }; 66 66 67 typedef std::function<int( const Type *, constType *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction;68 Cost convertToReferenceCost( const Type * src, constReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func );67 typedef std::function<int(Type *, Type *, const SymTab::Indexer &, const TypeEnvironment &)> PtrsFunction; 68 Cost convertToReferenceCost( Type * src, ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env, PtrsFunction func ); 69 69 70 70 // Some function pointer types, differ in return type.
Note:
See TracChangeset
for help on using the changeset viewer.