Mercurial > projects > ldc
comparison dmd/mtype.h @ 379:d632801b15f0
Introducing opaque type to dmd frontent to be used with certain runtime array
and aa args and returns. There are still some bugs with aas.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 22 Jul 2008 23:06:46 +0200 |
parents | aaade6ded589 |
children | 3545f9eddbfc |
comparison
equal
deleted
inserted
replaced
378:d8234836b40f | 379:d632801b15f0 |
---|---|
95 Terror, | 95 Terror, |
96 Tinstance, | 96 Tinstance, |
97 Ttypeof, | 97 Ttypeof, |
98 Ttuple, | 98 Ttuple, |
99 Tslice, | 99 Tslice, |
100 | |
101 // LLVMDC | |
102 Topaque, | |
103 | |
100 TMAX | 104 TMAX |
101 }; | 105 }; |
102 | 106 |
103 #define Tascii Tchar | 107 #define Tascii Tchar |
104 | 108 |
170 static ClassDeclaration *typeinfoassociativearray; | 174 static ClassDeclaration *typeinfoassociativearray; |
171 static ClassDeclaration *typeinfoenum; | 175 static ClassDeclaration *typeinfoenum; |
172 static ClassDeclaration *typeinfofunction; | 176 static ClassDeclaration *typeinfofunction; |
173 static ClassDeclaration *typeinfodelegate; | 177 static ClassDeclaration *typeinfodelegate; |
174 static ClassDeclaration *typeinfotypelist; | 178 static ClassDeclaration *typeinfotypelist; |
179 | |
180 // LLVMDC, for runtime function signatures that contain | |
181 // AAs or arrays of unknown type | |
182 static Type* topaque; | |
175 | 183 |
176 static Type *basic[TMAX]; | 184 static Type *basic[TMAX]; |
177 static unsigned char mangleChar[TMAX]; | 185 static unsigned char mangleChar[TMAX]; |
178 static StringTable stringtable; | 186 static StringTable stringtable; |
179 | 187 |
658 Type *semantic(Loc loc, Scope *sc); | 666 Type *semantic(Loc loc, Scope *sc); |
659 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); | 667 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); |
660 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 668 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
661 }; | 669 }; |
662 | 670 |
671 //LLVMDC | |
672 struct TypeOpaque : Type | |
673 { | |
674 TypeOpaque() : Type(Topaque, NULL) {} | |
675 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | |
676 }; | |
677 | |
663 /**************************************************************/ | 678 /**************************************************************/ |
664 | 679 |
665 //enum InOut { None, In, Out, InOut, Lazy }; | 680 //enum InOut { None, In, Out, InOut, Lazy }; |
666 | 681 |
667 struct Argument : Object | 682 struct Argument : Object |