Mercurial > projects > ldc
comparison dmd/mtype.h @ 1367:8026319762be
Merged DMD 1.045 !!!
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Sat, 16 May 2009 22:21:31 +0200 |
parents | 46f6365a50d7 |
children | 229e02867307 |
comparison
equal
deleted
inserted
replaced
1366:81121ac19f61 | 1367:8026319762be |
---|---|
220 virtual unsigned alignsize(); | 220 virtual unsigned alignsize(); |
221 virtual Type *semantic(Loc loc, Scope *sc); | 221 virtual Type *semantic(Loc loc, Scope *sc); |
222 // append the mangleof or a string uniquely identifying this type to buf | 222 // append the mangleof or a string uniquely identifying this type to buf |
223 virtual void toDecoBuffer(OutBuffer *buf, bool mangle); | 223 virtual void toDecoBuffer(OutBuffer *buf, bool mangle); |
224 Type *merge(); | 224 Type *merge(); |
225 Type *merge2(); | |
225 virtual void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs); | 226 virtual void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs); |
226 virtual void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 227 virtual void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
227 void toCBuffer3(OutBuffer *buf, HdrGenState *hgs, int mod); | 228 void toCBuffer3(OutBuffer *buf, HdrGenState *hgs, int mod); |
228 virtual int isbit(); | 229 virtual int isbit(); |
229 virtual int isintegral(); | 230 virtual int isintegral(); |
247 virtual ClassDeclaration *isClassHandle(); | 248 virtual ClassDeclaration *isClassHandle(); |
248 virtual Expression *getProperty(Loc loc, Identifier *ident); | 249 virtual Expression *getProperty(Loc loc, Identifier *ident); |
249 virtual Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 250 virtual Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
250 virtual unsigned memalign(unsigned salign); | 251 virtual unsigned memalign(unsigned salign); |
251 virtual Expression *defaultInit(Loc loc = 0); | 252 virtual Expression *defaultInit(Loc loc = 0); |
252 virtual int isZeroInit(); // if initializer is 0 | 253 virtual int isZeroInit(Loc loc = 0); // if initializer is 0 |
253 #if IN_DMD | 254 #if IN_DMD |
254 virtual dt_t **toDt(dt_t **pdt); | 255 virtual dt_t **toDt(dt_t **pdt); |
255 #endif | 256 #endif |
256 Identifier *getTypeInfoIdent(int internal); | 257 Identifier *getTypeInfoIdent(int internal); |
257 virtual MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 258 virtual MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
308 int iscomplex(); | 309 int iscomplex(); |
309 int isscalar(); | 310 int isscalar(); |
310 int isunsigned(); | 311 int isunsigned(); |
311 MATCH implicitConvTo(Type *to); | 312 MATCH implicitConvTo(Type *to); |
312 Expression *defaultInit(Loc loc); | 313 Expression *defaultInit(Loc loc); |
313 int isZeroInit(); | 314 int isZeroInit(Loc loc); |
314 int builtinTypeInfo(); | 315 int builtinTypeInfo(); |
315 | 316 |
316 // For eliminating dynamic_cast | 317 // For eliminating dynamic_cast |
317 TypeBasic *isTypeBasic(); | 318 TypeBasic *isTypeBasic(); |
318 }; | 319 }; |
336 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); | 337 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps); |
337 void toDecoBuffer(OutBuffer *buf, bool mangle); | 338 void toDecoBuffer(OutBuffer *buf, bool mangle); |
338 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 339 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
339 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 340 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
340 int isString(); | 341 int isString(); |
341 int isZeroInit(); | 342 int isZeroInit(Loc loc); |
342 unsigned memalign(unsigned salign); | 343 unsigned memalign(unsigned salign); |
343 MATCH implicitConvTo(Type *to); | 344 MATCH implicitConvTo(Type *to); |
344 Expression *defaultInit(Loc loc); | 345 Expression *defaultInit(Loc loc); |
345 #if IN_DMD | 346 #if IN_DMD |
346 dt_t **toDt(dt_t **pdt); | 347 dt_t **toDt(dt_t **pdt); |
367 Type *semantic(Loc loc, Scope *sc); | 368 Type *semantic(Loc loc, Scope *sc); |
368 void toDecoBuffer(OutBuffer *buf, bool mangle); | 369 void toDecoBuffer(OutBuffer *buf, bool mangle); |
369 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 370 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
370 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 371 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
371 int isString(); | 372 int isString(); |
372 int isZeroInit(); | 373 int isZeroInit(Loc loc); |
373 int checkBoolean(); | 374 int checkBoolean(); |
374 MATCH implicitConvTo(Type *to); | 375 MATCH implicitConvTo(Type *to); |
375 Expression *defaultInit(Loc loc); | 376 Expression *defaultInit(Loc loc); |
376 int builtinTypeInfo(); | 377 int builtinTypeInfo(); |
377 TypeInfoDeclaration *getTypeInfoDeclaration(); | 378 TypeInfoDeclaration *getTypeInfoDeclaration(); |
395 void toDecoBuffer(OutBuffer *buf, bool mangle); | 396 void toDecoBuffer(OutBuffer *buf, bool mangle); |
396 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 397 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
397 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 398 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
398 Expression *defaultInit(Loc loc); | 399 Expression *defaultInit(Loc loc); |
399 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 400 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
400 int isZeroInit(); | 401 int isZeroInit(Loc loc); |
401 int checkBoolean(); | 402 int checkBoolean(); |
402 TypeInfoDeclaration *getTypeInfoDeclaration(); | 403 TypeInfoDeclaration *getTypeInfoDeclaration(); |
403 int hasPointers(); | 404 int hasPointers(); |
404 | 405 |
405 #if IN_DMD | 406 #if IN_DMD |
420 MATCH implicitConvTo(Type *to); | 421 MATCH implicitConvTo(Type *to); |
421 int isscalar(); | 422 int isscalar(); |
422 // LDC: pointers are unsigned | 423 // LDC: pointers are unsigned |
423 int isunsigned() { return TRUE; }; | 424 int isunsigned() { return TRUE; }; |
424 Expression *defaultInit(Loc loc); | 425 Expression *defaultInit(Loc loc); |
425 int isZeroInit(); | 426 int isZeroInit(Loc loc); |
426 TypeInfoDeclaration *getTypeInfoDeclaration(); | 427 TypeInfoDeclaration *getTypeInfoDeclaration(); |
427 int hasPointers(); | 428 int hasPointers(); |
428 | 429 |
429 #if IN_DMD | 430 #if IN_DMD |
430 type *toCtype(); | 431 type *toCtype(); |
437 Type *syntaxCopy(); | 438 Type *syntaxCopy(); |
438 d_uns64 size(Loc loc); | 439 d_uns64 size(Loc loc); |
439 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 440 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
440 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 441 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
441 Expression *defaultInit(Loc loc); | 442 Expression *defaultInit(Loc loc); |
442 int isZeroInit(); | 443 int isZeroInit(Loc loc); |
443 }; | 444 }; |
444 | 445 |
445 enum RET | 446 enum RET |
446 { | 447 { |
447 RETregs = 1, // returned in registers | 448 RETregs = 1, // returned in registers |
491 Type *semantic(Loc loc, Scope *sc); | 492 Type *semantic(Loc loc, Scope *sc); |
492 d_uns64 size(Loc loc); | 493 d_uns64 size(Loc loc); |
493 unsigned alignsize(); // added in LDC | 494 unsigned alignsize(); // added in LDC |
494 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 495 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
495 Expression *defaultInit(Loc loc); | 496 Expression *defaultInit(Loc loc); |
496 int isZeroInit(); | 497 int isZeroInit(Loc loc); |
497 int checkBoolean(); | 498 int checkBoolean(); |
498 TypeInfoDeclaration *getTypeInfoDeclaration(); | 499 TypeInfoDeclaration *getTypeInfoDeclaration(); |
499 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 500 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
500 int hasPointers(); | 501 int hasPointers(); |
501 | 502 |
578 void toDecoBuffer(OutBuffer *buf, bool mangle); | 579 void toDecoBuffer(OutBuffer *buf, bool mangle); |
579 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 580 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
580 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 581 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
581 unsigned memalign(unsigned salign); | 582 unsigned memalign(unsigned salign); |
582 Expression *defaultInit(Loc loc); | 583 Expression *defaultInit(Loc loc); |
583 int isZeroInit(); | 584 int isZeroInit(Loc loc); |
584 int checkBoolean(); | 585 int checkBoolean(); |
585 #if IN_DMD | 586 #if IN_DMD |
586 dt_t **toDt(dt_t **pdt); | 587 dt_t **toDt(dt_t **pdt); |
587 #endif | 588 #endif |
588 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 589 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
619 int isscalar(); | 620 int isscalar(); |
620 int isunsigned(); | 621 int isunsigned(); |
621 MATCH implicitConvTo(Type *to); | 622 MATCH implicitConvTo(Type *to); |
622 Type *toBasetype(); | 623 Type *toBasetype(); |
623 Expression *defaultInit(Loc loc); | 624 Expression *defaultInit(Loc loc); |
624 int isZeroInit(); | 625 int isZeroInit(Loc loc); |
625 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 626 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
626 TypeInfoDeclaration *getTypeInfoDeclaration(); | 627 TypeInfoDeclaration *getTypeInfoDeclaration(); |
627 int hasPointers(); | 628 int hasPointers(); |
628 | 629 |
629 #if IN_DMD | 630 #if IN_DMD |
656 int isunsigned(); | 657 int isunsigned(); |
657 int checkBoolean(); | 658 int checkBoolean(); |
658 Type *toBasetype(); | 659 Type *toBasetype(); |
659 MATCH implicitConvTo(Type *to); | 660 MATCH implicitConvTo(Type *to); |
660 Expression *defaultInit(Loc loc); | 661 Expression *defaultInit(Loc loc); |
661 int isZeroInit(); | 662 int isZeroInit(Loc loc); |
662 #if IN_DMD | 663 #if IN_DMD |
663 dt_t **toDt(dt_t **pdt); | 664 dt_t **toDt(dt_t **pdt); |
664 #endif | 665 #endif |
665 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 666 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
666 TypeInfoDeclaration *getTypeInfoDeclaration(); | 667 TypeInfoDeclaration *getTypeInfoDeclaration(); |
687 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); | 688 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident); |
688 ClassDeclaration *isClassHandle(); | 689 ClassDeclaration *isClassHandle(); |
689 int isBaseOf(Type *t, int *poffset); | 690 int isBaseOf(Type *t, int *poffset); |
690 MATCH implicitConvTo(Type *to); | 691 MATCH implicitConvTo(Type *to); |
691 Expression *defaultInit(Loc loc); | 692 Expression *defaultInit(Loc loc); |
692 int isZeroInit(); | 693 int isZeroInit(Loc loc); |
693 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); | 694 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); |
694 int isauto(); | 695 int isauto(); |
695 int checkBoolean(); | 696 int checkBoolean(); |
696 TypeInfoDeclaration *getTypeInfoDeclaration(); | 697 TypeInfoDeclaration *getTypeInfoDeclaration(); |
697 int hasPointers(); | 698 int hasPointers(); |
699 int builtinTypeInfo(); | |
700 #if DMDV2 | |
701 Type *toHeadMutable(); | |
702 MATCH constConv(Type *to); | |
703 #if TARGET_LINUX || TARGET_OSX | |
704 void toCppMangle(OutBuffer *buf, CppMangleState *cms); | |
705 #endif | |
706 #endif | |
698 | 707 |
699 #if IN_DMD | 708 #if IN_DMD |
700 type *toCtype(); | 709 type *toCtype(); |
701 | 710 |
702 Symbol *toSymbol(); | 711 Symbol *toSymbol(); |