source: src/ResolvExpr/ConversionCost.h @ b37dba0

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since b37dba0 was 9236060, checked in by Rob Schluntz <rschlunt@…>, 7 years ago

Merge branch 'master' into references

  • Property mode set to 100644
File size: 1.8 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// ConversionCost.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Sun May 17 09:37:28 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:38:24 2017
13// Update Count     : 4
14//
15
16#pragma once
17
18#include "SynTree/Visitor.h"
19#include "SymTab/Indexer.h"
20#include "Cost.h"
21#include "TypeEnvironment.h"
22
23namespace ResolvExpr {
24        class ConversionCost : public Visitor {
25          public:
26                ConversionCost( Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
27
28                Cost get_cost() const { return cost; }
29
30                virtual void visit(VoidType *voidType);
31                virtual void visit(BasicType *basicType);
32                virtual void visit(PointerType *pointerType);
33                virtual void visit(ArrayType *arrayType);
34                virtual void visit(ReferenceType *refType);
35                virtual void visit(FunctionType *functionType);
36                virtual void visit(StructInstType *aggregateUseType);
37                virtual void visit(UnionInstType *aggregateUseType);
38                virtual void visit(EnumInstType *aggregateUseType);
39                virtual void visit(TraitInstType *aggregateUseType);
40                virtual void visit(TypeInstType *aggregateUseType);
41                virtual void visit(TupleType *tupleType);
42                virtual void visit(VarArgsType *varArgsType);
43                virtual void visit(ZeroType *zeroType);
44                virtual void visit(OneType *oneType);
45          protected:
46                Type *dest;
47                const SymTab::Indexer &indexer;
48                Cost cost;
49                const TypeEnvironment &env;
50        };
51
52        Cost convertToReferenceCost( Type * src, ReferenceType * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
53} // namespace ResolvExpr
54
55// Local Variables: //
56// tab-width: 4 //
57// mode: c++ //
58// compile-command: "make install" //
59// End: //
Note: See TracBrowser for help on using the repository browser.