Mercurial > projects > ldc
annotate ir/irtype.h @ 1421:7a693c367190
just a simple change to cmake for mingw
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Wed, 27 May 2009 12:41:41 -0600 |
parents | 81121ac19f61 |
children |
rev | line source |
---|---|
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
1 #ifndef __LDC_IR_IRTYPE_H__ |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
2 #define __LDC_IR_IRTYPE_H__ |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
3 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
4 #include "llvm/Type.h" |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
5 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
6 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
7 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
8 // forward declarations |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
9 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
10 struct Type; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
11 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
12 class IrTypeAggr; |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
13 class IrTypeArray; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
14 class IrTypeBasic; |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
15 class IrTypeClass; |
1366
81121ac19f61
Fixed previous aggregate initZ alignment.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1364
diff
changeset
|
16 class IrTypeDelegate; |
1364
46f6365a50d7
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1228
diff
changeset
|
17 class IrTypeFunction; |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
18 class IrTypePointer; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
19 class IrTypeSArray; |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
20 class IrTypeStruct; |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
21 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
22 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
23 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
24 /// Base class for IrTypeS. |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
25 class IrType |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
26 { |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
27 public: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
28 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
29 IrType(Type* dt, const llvm::Type* lt); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
30 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
31 /// |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
32 virtual IrTypeAggr* isAggr() { return NULL; } |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
33 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
34 virtual IrTypeArray* isArray() { return NULL; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
35 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
36 virtual IrTypeBasic* isBasic() { return NULL; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
37 /// |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
38 virtual IrTypeClass* isClass() { return NULL; } |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
39 /// |
1366
81121ac19f61
Fixed previous aggregate initZ alignment.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1364
diff
changeset
|
40 virtual IrTypeDelegate* isDelegate(){ return NULL; } |
81121ac19f61
Fixed previous aggregate initZ alignment.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1364
diff
changeset
|
41 /// |
1364
46f6365a50d7
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1228
diff
changeset
|
42 virtual IrTypeFunction* isFunction(){ return NULL; } |
46f6365a50d7
Added IrTypeFunction and IrTypeDelegate and eliminated IrDType. This means the Type::ir field can be removed. It's the final part needed for the move to a slightly more sane type system. Now the whole thing just needs to be cleaned up :P
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
1228
diff
changeset
|
43 /// |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
44 virtual IrTypePointer* isPointer() { return NULL; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
45 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
46 virtual IrTypeSArray* isSArray() { return NULL; } |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
47 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
48 virtual IrTypeStruct* isStruct() { return NULL; } |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
49 |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
50 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
51 Type* getD() { return dtype; } |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
52 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
53 virtual const llvm::Type* get() { return pa.get(); } |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
54 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
55 llvm::PATypeHolder& getPA() { return pa; } |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
56 |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
57 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
58 virtual const llvm::Type* buildType() = 0; |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
59 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
60 protected: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
61 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
62 Type* dtype; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
63 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
64 /// LLVM type holder. |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
65 llvm::PATypeHolder pa; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
66 }; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
67 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
68 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
69 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
70 /// IrType for basic D types. |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
71 class IrTypeBasic : public IrType |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
72 { |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
73 public: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
74 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
75 IrTypeBasic(Type* dt); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
76 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
77 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
78 IrTypeBasic* isBasic() { return this; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
79 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
80 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
81 const llvm::Type* buildType(); |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
82 |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
83 protected: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
84 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
85 const llvm::Type* basic2llvm(Type* t); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
86 }; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
87 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
88 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
89 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
90 /// IrType from pointers. |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
91 class IrTypePointer : public IrType |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
92 { |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
93 public: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
94 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
95 IrTypePointer(Type* dt); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
96 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
97 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
98 IrTypePointer* isPointer() { return this; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
99 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
100 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
101 const llvm::Type* buildType(); |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
102 |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
103 protected: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
104 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
105 const llvm::Type* pointer2llvm(Type* t); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
106 }; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
107 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
108 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
109 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
110 /// IrType for static arrays |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
111 class IrTypeSArray : public IrType |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
112 { |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
113 public: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
114 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
115 IrTypeSArray(Type* dt); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
116 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
117 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
118 IrTypeSArray* isSArray() { return this; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
119 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
120 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
121 const llvm::Type* buildType(); |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
122 |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
123 protected: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
124 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
125 const llvm::Type* sarray2llvm(Type* t); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
126 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
127 /// Dimension. |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
128 uint64_t dim; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
129 }; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
130 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
131 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
132 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
133 /// IrType for dynamic arrays |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
134 class IrTypeArray : public IrType |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
135 { |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
136 public: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
137 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
138 IrTypeArray(Type* dt); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
139 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
140 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
141 IrTypeArray* isArray() { return this; } |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
142 |
1228
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
143 /// |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
144 const llvm::Type* buildType(); |
79758fd2f48a
Added Doxygen file.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
1192
diff
changeset
|
145 |
1192
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
146 protected: |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
147 /// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
148 const llvm::Type* array2llvm(Type* t); |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
149 }; |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
150 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
151 ////////////////////////////////////////////////////////////////////////////// |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
152 |
3251ce06c820
Started seperating type resolution from the rest of codegen again, the merge had too many regressions.
Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
parents:
diff
changeset
|
153 #endif |