comparison dmd/mtype.h @ 1602:a413ae7329bf

Merge DMD r243: some harmonization with D2 dmd --- dmd/aggregate.h | 24 ++++- dmd/attrib.c | 63 ++++++---- dmd/attrib.h | 10 +- dmd/declaration.h | 5 +- dmd/func.c | 337 ++++++++++++++++++++++------------------------------- dmd/mars.c | 2 +- dmd/mars.h | 7 + dmd/mtype.h | 13 ++- dmd/parse.c | 32 ++++- dmd/parse.h | 14 ++- dmd/scope.h | 2 +- 11 files changed, 263 insertions(+), 246 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:19 -0300
parents def7a1d494fd
children 207a8a438dea
comparison
equal deleted inserted replaced
1601:49722e6e6e05 1602:a413ae7329bf
588 dt_t **toDt(dt_t **pdt); 588 dt_t **toDt(dt_t **pdt);
589 #endif 589 #endif
590 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes); 590 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
591 TypeInfoDeclaration *getTypeInfoDeclaration(); 591 TypeInfoDeclaration *getTypeInfoDeclaration();
592 int hasPointers(); 592 int hasPointers();
593 #if CPP_MANGLE
594 void toCppMangle(OutBuffer *buf, CppMangleState *cms);
595 #endif
593 596
594 #if IN_DMD 597 #if IN_DMD
595 type *toCtype(); 598 type *toCtype();
596 #elif IN_LLVM 599 #elif IN_LLVM
597 // LDC 600 // LDC
699 int hasPointers(); 702 int hasPointers();
700 int builtinTypeInfo(); 703 int builtinTypeInfo();
701 #if DMDV2 704 #if DMDV2
702 Type *toHeadMutable(); 705 Type *toHeadMutable();
703 MATCH constConv(Type *to); 706 MATCH constConv(Type *to);
704 #if TARGET_LINUX || TARGET_OSX 707 #if CPP_MANGLE
705 void toCppMangle(OutBuffer *buf, CppMangleState *cms); 708 void toCppMangle(OutBuffer *buf, CppMangleState *cms);
706 #endif 709 #endif
707 #endif 710 #endif
708 711
709 #if IN_DMD 712 #if IN_DMD
746 //enum InOut { None, In, Out, InOut, Lazy }; 749 //enum InOut { None, In, Out, InOut, Lazy };
747 750
748 struct Argument : Object 751 struct Argument : Object
749 { 752 {
750 //enum InOut inout; 753 //enum InOut inout;
751 unsigned storageClass; 754 StorageClass storageClass;
752 Type *type; 755 Type *type;
753 Identifier *ident; 756 Identifier *ident;
754 Expression *defaultArg; 757 Expression *defaultArg;
755 758
756 Argument(unsigned storageClass, Type *type, Identifier *ident, Expression *defaultArg); 759 Argument(StorageClass storageClass, Type *type, Identifier *ident, Expression *defaultArg);
757 Argument *syntaxCopy(); 760 Argument *syntaxCopy();
758 Type *isLazyArray(); 761 Type *isLazyArray();
759 void toDecoBuffer(OutBuffer *buf, bool mangle); 762 void toDecoBuffer(OutBuffer *buf, bool mangle);
760 static Arguments *arraySyntaxCopy(Arguments *args); 763 static Arguments *arraySyntaxCopy(Arguments *args);
761 static char *argsTypesToChars(Arguments *args, int varargs); 764 static char *argsTypesToChars(Arguments *args, int varargs);
765 static void argsCppMangle(OutBuffer *buf, CppMangleState *cms, Arguments *arguments, int varargs);
762 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); 766 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs);
763 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments, bool mangle); 767 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments, bool mangle);
768 static int isTPL(Arguments *arguments);
764 static size_t dim(Arguments *arguments); 769 static size_t dim(Arguments *arguments);
765 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); 770 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL);
766 }; 771 };
767 772
768 extern int PTRSIZE; 773 extern int PTRSIZE;
769 extern int REALSIZE; 774 extern int REALSIZE;
770 extern int REALPAD; 775 extern int REALPAD;
771 extern int Tsize_t; 776 extern int Tsize_t;
772 extern int Tptrdiff_t; 777 extern int Tptrdiff_t;
773 778
779 int arrayTypeCompatible(Loc loc, Type *t1, Type *t2);
780
774 #endif /* DMD_MTYPE_H */ 781 #endif /* DMD_MTYPE_H */