Mercurial > projects > ldc
comparison dmd/mtype.h @ 1607:207a8a438dea
Merge DMD r253: refactor: Argument => Parameter
---
dmd/arrayop.c | 30 ++++----
dmd/arraytypes.h | 2 +-
dmd/class.c | 8 +-
dmd/declaration.c | 10 ++--
dmd/declaration.h | 16 ++--
dmd/doc.c | 12 ++--
dmd/dsymbol.c | 4 +-
dmd/expression.c | 48 +++++++-------
dmd/expression.h | 32 +++++-----
dmd/func.c | 78 +++++++++++-----------
dmd/init.c | 2 +-
dmd/interpret.c | 8 +-
dmd/mtype.c | 190 ++++++++++++++++++++++++++--------------------------
dmd/mtype.h | 32 +++++-----
dmd/opover.c | 34 +++++-----
dmd/parse.c | 40 ++++++------
dmd/parse.h | 2 +-
dmd/statement.c | 90 +++++++++++++-------------
dmd/statement.h | 14 ++--
dmd/struct.c | 8 +-
dmd/template.c | 30 ++++----
gen/functions.cpp | 10 ++--
gen/functions.h | 2 +-
gen/tocall.cpp | 10 ++--
gen/typinf.cpp | 6 +-
25 files changed, 359 insertions(+), 359 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:20 -0300 |
parents | a413ae7329bf |
children | c61782a76dff |
comparison
equal
deleted
inserted
replaced
1606:1b24e9c7cc26 | 1607:207a8a438dea |
---|---|
42 struct CppMangleState; | 42 struct CppMangleState; |
43 enum LINK; | 43 enum LINK; |
44 | 44 |
45 struct TypeBasic; | 45 struct TypeBasic; |
46 struct HdrGenState; | 46 struct HdrGenState; |
47 struct Argument; | 47 struct Parameter; |
48 | 48 |
49 // Back end | 49 // Back end |
50 #if IN_GCC | 50 #if IN_GCC |
51 union tree_node; typedef union tree_node TYPE; | 51 union tree_node; typedef union tree_node TYPE; |
52 typedef TYPE type; | 52 typedef TYPE type; |
449 RETstack = 2, // returned on stack | 449 RETstack = 2, // returned on stack |
450 }; | 450 }; |
451 | 451 |
452 struct TypeFunction : Type | 452 struct TypeFunction : Type |
453 { | 453 { |
454 Arguments *parameters; // function parameters | 454 Parameters *parameters; // function parameters |
455 int varargs; // 1: T t, ...) style for variable number of arguments | 455 int varargs; // 1: T t, ...) style for variable number of arguments |
456 // 2: T t ...) style for variable number of arguments | 456 // 2: T t ...) style for variable number of arguments |
457 enum LINK linkage; // calling convention | 457 enum LINK linkage; // calling convention |
458 | 458 |
459 int inuse; | 459 int inuse; |
460 | 460 |
461 TypeFunction(Arguments *parameters, Type *treturn, int varargs, enum LINK linkage); | 461 TypeFunction(Parameters *parameters, Type *treturn, int varargs, enum LINK linkage); |
462 Type *syntaxCopy(); | 462 Type *syntaxCopy(); |
463 Type *semantic(Loc loc, Scope *sc); | 463 Type *semantic(Loc loc, Scope *sc); |
464 void toDecoBuffer(OutBuffer *buf, bool mangle); | 464 void toDecoBuffer(OutBuffer *buf, bool mangle); |
465 void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs); | 465 void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs); |
466 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); | 466 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod); |
716 #endif | 716 #endif |
717 }; | 717 }; |
718 | 718 |
719 struct TypeTuple : Type | 719 struct TypeTuple : Type |
720 { | 720 { |
721 Arguments *arguments; // types making up the tuple | 721 Parameters *arguments; // types making up the tuple |
722 | 722 |
723 TypeTuple(Arguments *arguments); | 723 TypeTuple(Parameters *arguments); |
724 TypeTuple(Expressions *exps); | 724 TypeTuple(Expressions *exps); |
725 Type *syntaxCopy(); | 725 Type *syntaxCopy(); |
726 Type *semantic(Loc loc, Scope *sc); | 726 Type *semantic(Loc loc, Scope *sc); |
727 int equals(Object *o); | 727 int equals(Object *o); |
728 Type *reliesOnTident(); | 728 Type *reliesOnTident(); |
746 | 746 |
747 /**************************************************************/ | 747 /**************************************************************/ |
748 | 748 |
749 //enum InOut { None, In, Out, InOut, Lazy }; | 749 //enum InOut { None, In, Out, InOut, Lazy }; |
750 | 750 |
751 struct Argument : Object | 751 struct Parameter : Object |
752 { | 752 { |
753 //enum InOut inout; | 753 //enum InOut inout; |
754 StorageClass storageClass; | 754 StorageClass storageClass; |
755 Type *type; | 755 Type *type; |
756 Identifier *ident; | 756 Identifier *ident; |
757 Expression *defaultArg; | 757 Expression *defaultArg; |
758 | 758 |
759 Argument(StorageClass storageClass, Type *type, Identifier *ident, Expression *defaultArg); | 759 Parameter(StorageClass storageClass, Type *type, Identifier *ident, Expression *defaultArg); |
760 Argument *syntaxCopy(); | 760 Parameter *syntaxCopy(); |
761 Type *isLazyArray(); | 761 Type *isLazyArray(); |
762 void toDecoBuffer(OutBuffer *buf, bool mangle); | 762 void toDecoBuffer(OutBuffer *buf, bool mangle); |
763 static Arguments *arraySyntaxCopy(Arguments *args); | 763 static Parameters *arraySyntaxCopy(Parameters *args); |
764 static char *argsTypesToChars(Arguments *args, int varargs); | 764 static char *argsTypesToChars(Parameters *args, int varargs); |
765 static void argsCppMangle(OutBuffer *buf, CppMangleState *cms, Arguments *arguments, int varargs); | 765 static void argsCppMangle(OutBuffer *buf, CppMangleState *cms, Parameters *arguments, int varargs); |
766 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); | 766 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Parameters *arguments, int varargs); |
767 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments, bool mangle); | 767 static void argsToDecoBuffer(OutBuffer *buf, Parameters *arguments, bool mangle); |
768 static int isTPL(Arguments *arguments); | 768 static int isTPL(Parameters *arguments); |
769 static size_t dim(Arguments *arguments); | 769 static size_t dim(Parameters *arguments); |
770 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); | 770 static Parameter *getNth(Parameters *arguments, size_t nth, size_t *pn = NULL); |
771 }; | 771 }; |
772 | 772 |
773 extern int PTRSIZE; | 773 extern int PTRSIZE; |
774 extern int REALSIZE; | 774 extern int REALSIZE; |
775 extern int REALPAD; | 775 extern int REALPAD; |