Mercurial > projects > ldc
comparison dmd/mtype.h @ 663:6aaa3d3c1183
First part of rename to LDC.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 06 Oct 2008 22:46:55 +0200 |
parents | 50383e476c7e |
children | 30b42a283c8e |
comparison
equal
deleted
inserted
replaced
662:88e23f8c2354 | 663:6aaa3d3c1183 |
---|---|
96 Tinstance, | 96 Tinstance, |
97 Ttypeof, | 97 Ttypeof, |
98 Ttuple, | 98 Ttuple, |
99 Tslice, | 99 Tslice, |
100 | 100 |
101 // LLVMDC | 101 // LDC |
102 Topaque, | 102 Topaque, |
103 | 103 |
104 TMAX | 104 TMAX |
105 }; | 105 }; |
106 | 106 |
175 static ClassDeclaration *typeinfoenum; | 175 static ClassDeclaration *typeinfoenum; |
176 static ClassDeclaration *typeinfofunction; | 176 static ClassDeclaration *typeinfofunction; |
177 static ClassDeclaration *typeinfodelegate; | 177 static ClassDeclaration *typeinfodelegate; |
178 static ClassDeclaration *typeinfotypelist; | 178 static ClassDeclaration *typeinfotypelist; |
179 | 179 |
180 // LLVMDC, for runtime function signatures that contain | 180 // LDC, for runtime function signatures that contain |
181 // AAs or arrays of unknown type | 181 // AAs or arrays of unknown type |
182 static Type* topaque; | 182 static Type* topaque; |
183 | 183 |
184 static Type *basic[TMAX]; | 184 static Type *basic[TMAX]; |
185 static unsigned char mangleChar[TMAX]; | 185 static unsigned char mangleChar[TMAX]; |
258 virtual Symbol *toSymbol(); | 258 virtual Symbol *toSymbol(); |
259 | 259 |
260 // For eliminating dynamic_cast | 260 // For eliminating dynamic_cast |
261 virtual TypeBasic *isTypeBasic(); | 261 virtual TypeBasic *isTypeBasic(); |
262 | 262 |
263 // llvmdc | 263 // LDC |
264 IrType ir; | 264 IrType ir; |
265 }; | 265 }; |
266 | 266 |
267 struct TypeBasic : Type | 267 struct TypeBasic : Type |
268 { | 268 { |
387 Type *semantic(Loc loc, Scope *sc); | 387 Type *semantic(Loc loc, Scope *sc); |
388 d_uns64 size(Loc loc); | 388 d_uns64 size(Loc loc); |
389 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 389 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
390 MATCH implicitConvTo(Type *to); | 390 MATCH implicitConvTo(Type *to); |
391 int isscalar(); | 391 int isscalar(); |
392 // LLVMDC: pointers are unsigned | 392 // LDC: pointers are unsigned |
393 int isunsigned() { return TRUE; }; | 393 int isunsigned() { return TRUE; }; |
394 Expression *defaultInit(Loc loc); | 394 Expression *defaultInit(Loc loc); |
395 int isZeroInit(); | 395 int isZeroInit(); |
396 TypeInfoDeclaration *getTypeInfoDeclaration(); | 396 TypeInfoDeclaration *getTypeInfoDeclaration(); |
397 int hasPointers(); | 397 int hasPointers(); |
439 type *toCtype(); | 439 type *toCtype(); |
440 enum RET retStyle(); | 440 enum RET retStyle(); |
441 | 441 |
442 unsigned totym(); | 442 unsigned totym(); |
443 | 443 |
444 // LLVMDC | 444 // LDC |
445 bool retInPtr; | 445 bool retInPtr; |
446 bool usesThis; | 446 bool usesThis; |
447 bool usesNest; | 447 bool usesNest; |
448 unsigned retAttrs; | 448 unsigned retAttrs; |
449 }; | 449 }; |
672 Type *semantic(Loc loc, Scope *sc); | 672 Type *semantic(Loc loc, Scope *sc); |
673 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); | 673 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); |
674 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 674 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
675 }; | 675 }; |
676 | 676 |
677 //LLVMDC | 677 //LDC |
678 struct TypeOpaque : Type | 678 struct TypeOpaque : Type |
679 { | 679 { |
680 TypeOpaque() : Type(Topaque, NULL) {} | 680 TypeOpaque() : Type(Topaque, NULL) {} |
681 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 681 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
682 }; | 682 }; |
702 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); | 702 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); |
703 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments); | 703 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments); |
704 static size_t dim(Arguments *arguments); | 704 static size_t dim(Arguments *arguments); |
705 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); | 705 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); |
706 | 706 |
707 // LLVMDC | 707 // LDC |
708 unsigned llvmAttrs; | 708 unsigned llvmAttrs; |
709 }; | 709 }; |
710 | 710 |
711 extern int PTRSIZE; | 711 extern int PTRSIZE; |
712 extern int REALSIZE; | 712 extern int REALSIZE; |