Allow implicit cast from null to maybe types ("Type?")
[delight/core.git] / dmd / mtype.h
blob9e97f08ecd70f4fb8c714cd8bc41c1a8d6408593
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2007 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
11 /* NOTE: This file has been patched from the original DMD distribution to
12 work with the GDC compiler.
14 Modified by David Friedman, January 2007
17 #ifndef DMD_MTYPE_H
18 #define DMD_MTYPE_H
20 #ifndef ENUM_TY_ONLY
22 #ifdef __DMC__
23 #pragma once
24 #endif /* __DMC__ */
26 #include "root.h"
27 #include "stringtable.h"
29 #include "arraytypes.h"
30 #include "expression.h"
32 struct Scope;
33 struct Identifier;
34 struct Expression;
35 struct StructDeclaration;
36 struct ClassDeclaration;
37 struct VarDeclaration;
38 struct EnumDeclaration;
39 struct TypedefDeclaration;
40 struct TypeInfoDeclaration;
41 struct Dsymbol;
42 struct TemplateInstance;
43 enum LINK;
45 struct TypeBasic;
46 struct HdrGenState;
48 // Back end
49 #if IN_GCC
50 union tree_node; typedef union tree_node TYPE;
51 typedef TYPE type;
52 #else
53 typedef struct TYPE type;
54 #endif
55 struct Symbol;
57 #endif
59 enum TY
61 Tarray, // dynamic array
62 Tsarray, // static array
63 Taarray, // associative array
64 Tpointer,
65 Treference,
66 Tfunction,
67 Tident,
68 Tclass,
69 Tstruct,
70 Tenum,
71 Ttypedef,
72 Tdelegate,
74 Tnone,
75 Tvoid,
76 Tint8,
77 Tuns8,
78 Tint16,
79 Tuns16,
80 Tint32,
81 Tuns32,
82 Tint64,
83 Tuns64,
84 Tfloat32,
85 Tfloat64,
86 Tfloat80,
88 Timaginary32,
89 Timaginary64,
90 Timaginary80,
92 Tcomplex32,
93 Tcomplex64,
94 Tcomplex80,
96 Tbit,
97 Tbool,
98 Tchar,
99 Twchar,
100 Tdchar,
102 Terror,
103 Tinstance,
104 Ttypeof,
105 Ttuple,
106 Tslice,
108 Tmaybe,
110 TMAX
113 #ifndef ENUM_TY_ONLY
115 #define Tascii Tchar
117 extern int Tsize_t;
118 extern int Tptrdiff_t;
119 extern int Tindex;
121 struct Type : Object
123 TY ty;
124 unsigned char mod; // modifiers (MODconst, MODinvariant)
125 #define MODconst 1 // type is const
126 #define MODinvariant 2 // type is invariant
127 Type *next;
128 char *deco;
129 Type *pto; // merged pointer to this type
130 Type *mbe; // maybe null of this pointer or reference
131 Type *rto; // reference to this type
132 Type *arrayof; // array of this type
133 TypeInfoDeclaration *vtinfo; // TypeInfo object for this Type
135 type *ctype; // for back end
137 #define tvoid basic[Tvoid]
138 #define tint8 basic[Tint8]
139 #define tuns8 basic[Tuns8]
140 #define tint16 basic[Tint16]
141 #define tuns16 basic[Tuns16]
142 #define tint32 basic[Tint32]
143 #define tuns32 basic[Tuns32]
144 #define tint64 basic[Tint64]
145 #define tuns64 basic[Tuns64]
146 #define tfloat32 basic[Tfloat32]
147 #define tfloat64 basic[Tfloat64]
148 #define tfloat80 basic[Tfloat80]
150 #define timaginary32 basic[Timaginary32]
151 #define timaginary64 basic[Timaginary64]
152 #define timaginary80 basic[Timaginary80]
154 #define tcomplex32 basic[Tcomplex32]
155 #define tcomplex64 basic[Tcomplex64]
156 #define tcomplex80 basic[Tcomplex80]
158 #define tbit basic[Tbit]
159 #define tbool basic[Tbool]
160 #define tchar basic[Tchar]
161 #define twchar basic[Twchar]
162 #define tdchar basic[Tdchar]
164 // Some special types
165 #define tshiftcnt tint32 // right side of shift expression
166 // #define tboolean tint32 // result of boolean expression
167 #define tboolean tbool // result of boolean expression
168 #define tindex basic[Tindex] // array/ptr index
169 static Type *tvoidptr; // void*
170 #define terror basic[Terror] // for error recovery
172 #define tsize_t basic[Tsize_t] // matches size_t alias
173 #define tptrdiff_t basic[Tptrdiff_t] // matches ptrdiff_t alias
174 #define thash_t tsize_t // matches hash_t alias
176 static ClassDeclaration *typeinfo;
177 static ClassDeclaration *typeinfoclass;
178 static ClassDeclaration *typeinfointerface;
179 static ClassDeclaration *typeinfostruct;
180 static ClassDeclaration *typeinfotypedef;
181 static ClassDeclaration *typeinfopointer;
182 static ClassDeclaration *typeinfomaybe;
183 static ClassDeclaration *typeinfoarray;
184 static ClassDeclaration *typeinfostaticarray;
185 static ClassDeclaration *typeinfoassociativearray;
186 static ClassDeclaration *typeinfoenum;
187 static ClassDeclaration *typeinfofunction;
188 static ClassDeclaration *typeinfodelegate;
189 static ClassDeclaration *typeinfotypelist;
191 static Type *basic[TMAX];
192 static unsigned char mangleChar[TMAX];
193 static StringTable stringtable;
195 // These tables are for implicit conversion of binary ops;
196 // the indices are the type of operand one, followed by operand two.
197 static unsigned char impcnvResult[TMAX][TMAX];
198 static unsigned char impcnvType1[TMAX][TMAX];
199 static unsigned char impcnvType2[TMAX][TMAX];
201 // If !=0, give warning on implicit conversion
202 static unsigned char impcnvWarn[TMAX][TMAX];
204 Type(TY ty, Type *next);
205 virtual Type *syntaxCopy();
206 int equals(Object *o);
207 int dyncast() { return DYNCAST_TYPE; } // kludge for template.isType()
208 int covariant(Type *t);
209 char *toChars();
210 static char needThisPrefix();
211 static void init();
212 d_uns64 size();
213 virtual d_uns64 size(Loc loc);
214 virtual unsigned alignsize();
215 virtual Type *semantic(Loc loc, Scope *sc);
216 virtual void toDecoBuffer(OutBuffer *buf);
217 Type *merge();
218 virtual void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs);
219 virtual void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
220 void toCBuffer3(OutBuffer *buf, HdrGenState *hgs, int mod);
221 virtual int isbit();
222 virtual int isintegral();
223 virtual int isfloating(); // real, imaginary, or complex
224 virtual int isreal();
225 virtual int isimaginary();
226 virtual int iscomplex();
227 virtual int isscalar();
228 virtual int isunsigned();
229 virtual int isauto();
230 virtual int isString();
231 virtual int checkBoolean(); // if can be converted to boolean value
232 void checkDeprecated(Loc loc, Scope *sc);
233 Type *pointerTo();
234 Type *maybe();
235 Type *referenceTo();
236 Type *arrayOf();
237 virtual Dsymbol *toDsymbol(Scope *sc);
238 virtual Type *toBasetype();
239 virtual int isBaseOf(Type *t, target_ptrdiff_t *poffset);
240 virtual MATCH implicitConvTo(Type *to);
241 virtual ClassDeclaration *isClassHandle();
242 virtual Expression *getProperty(Loc loc, Identifier *ident);
243 virtual Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
244 virtual unsigned memalign(unsigned salign);
245 virtual Expression *defaultInit(Loc loc = 0);
246 virtual int isZeroInit(); // if initializer is 0
247 virtual dt_t **toDt(dt_t **pdt);
248 Identifier *getTypeInfoIdent(int internal);
249 virtual MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
250 virtual void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
251 Expression *getInternalTypeInfo(Scope *sc);
252 Expression *getTypeInfo(Scope *sc);
253 virtual TypeInfoDeclaration *getTypeInfoDeclaration();
254 virtual int builtinTypeInfo();
255 virtual Type *reliesOnTident();
256 virtual Expression *toExpression();
257 virtual int hasPointers();
258 Type *nextOf() { return next; }
260 static void error(Loc loc, const char *format, ...);
262 // For backend
263 virtual unsigned totym();
264 virtual type *toCtype();
265 virtual type *toCParamtype();
266 virtual Symbol *toSymbol();
268 // For eliminating dynamic_cast
269 virtual TypeBasic *isTypeBasic();
272 struct TypeBasic : Type
274 char *dstring;
275 char *cstring;
276 unsigned flags;
278 TypeBasic(TY ty);
279 Type *syntaxCopy();
280 d_uns64 size(Loc loc);
281 unsigned alignsize();
282 Expression *getProperty(Loc loc, Identifier *ident);
283 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
284 char *toChars();
285 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
286 int isintegral();
287 int isbit();
288 int isfloating();
289 int isreal();
290 int isimaginary();
291 int iscomplex();
292 int isscalar();
293 int isunsigned();
294 MATCH implicitConvTo(Type *to);
295 Expression *defaultInit(Loc loc);
296 int isZeroInit();
297 int builtinTypeInfo();
299 // For eliminating dynamic_cast
300 TypeBasic *isTypeBasic();
303 struct TypeArray : Type
305 TypeArray(TY ty, Type *next);
306 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
309 // Static array, one with a fixed dimension
310 struct TypeSArray : TypeArray
312 Expression *dim;
314 TypeSArray(Type *t, Expression *dim);
315 Type *syntaxCopy();
316 d_uns64 size(Loc loc);
317 unsigned alignsize();
318 Type *semantic(Loc loc, Scope *sc);
319 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
320 void toDecoBuffer(OutBuffer *buf);
321 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
322 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
323 int isString();
324 int isZeroInit();
325 unsigned memalign(unsigned salign);
326 MATCH implicitConvTo(Type *to);
327 Expression *defaultInit(Loc loc);
328 dt_t **toDt(dt_t **pdt);
329 dt_t **toDtElem(dt_t **pdt, Expression *e);
330 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
331 TypeInfoDeclaration *getTypeInfoDeclaration();
332 Expression *toExpression();
333 int hasPointers();
335 type *toCtype();
336 type *toCParamtype();
339 // Dynamic array, no dimension
340 struct TypeDArray : TypeArray
342 TypeDArray(Type *t);
343 Type *syntaxCopy();
344 d_uns64 size(Loc loc);
345 unsigned alignsize();
346 Type *semantic(Loc loc, Scope *sc);
347 void toDecoBuffer(OutBuffer *buf);
348 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
349 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
350 int isString();
351 int isZeroInit();
352 int checkBoolean();
353 MATCH implicitConvTo(Type *to);
354 Expression *defaultInit(Loc loc);
355 int builtinTypeInfo();
356 TypeInfoDeclaration *getTypeInfoDeclaration();
357 int hasPointers();
359 type *toCtype();
362 struct TypeAArray : TypeArray
364 Type *index; // key type for type checking
365 Type *key; // actual key type
367 TypeAArray(Type *t, Type *index);
368 Type *syntaxCopy();
369 d_uns64 size(Loc loc);
370 Type *semantic(Loc loc, Scope *sc);
371 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
372 void toDecoBuffer(OutBuffer *buf);
373 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
374 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
375 Expression *defaultInit(Loc loc);
376 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
377 int checkBoolean();
378 TypeInfoDeclaration *getTypeInfoDeclaration();
379 int hasPointers();
381 // Back end
382 Symbol *aaGetSymbol(char *func, int flags);
384 type *toCtype();
387 struct TypePointer : Type
389 TypePointer(Type *t);
390 Type *syntaxCopy();
391 Type *semantic(Loc loc, Scope *sc);
392 d_uns64 size(Loc loc);
393 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
394 MATCH implicitConvTo(Type *to);
395 int isscalar();
396 Expression *defaultInit(Loc loc);
397 int isZeroInit();
398 TypeInfoDeclaration *getTypeInfoDeclaration();
399 int hasPointers();
401 type *toCtype();
404 struct TypeMaybe : Type
406 TypeMaybe(Type *t);
407 Type *syntaxCopy();
409 Type *semantic(Loc loc, Scope *sc);
410 d_uns64 size(Loc loc);
411 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
412 MATCH implicitConvTo(Type *to);
413 int isscalar();
414 Expression *defaultInit(Loc loc);
415 int isZeroInit();
416 TypeInfoDeclaration *getTypeInfoDeclaration();
417 int hasPointers();
419 type *toCtype();
422 struct TypeReference : Type
424 TypeReference(Type *t);
425 Type *syntaxCopy();
426 d_uns64 size(Loc loc);
427 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
428 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
429 Expression *defaultInit(Loc loc);
430 int isZeroInit();
433 enum RET
435 RETregs = 1, // returned in registers
436 RETstack = 2, // returned on stack
439 struct TypeFunction : Type
441 Arguments *parameters; // function parameters
442 int varargs; // 1: T t, ...) style for variable number of arguments
443 // 2: T t ...) style for variable number of arguments
444 enum LINK linkage; // calling convention
446 int inuse;
448 TypeFunction(Arguments *parameters, Type *treturn, int varargs, enum LINK linkage);
449 Type *syntaxCopy();
450 Type *semantic(Loc loc, Scope *sc);
451 void toDecoBuffer(OutBuffer *buf);
452 void toCBuffer(OutBuffer *buf, Identifier *ident, HdrGenState *hgs);
453 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
454 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
455 TypeInfoDeclaration *getTypeInfoDeclaration();
456 Type *reliesOnTident();
458 int callMatch(Expressions *toargs);
459 type *toCtype();
460 enum RET retStyle();
462 unsigned totym();
465 struct TypeDelegate : Type
467 TypeDelegate(Type *t);
468 Type *syntaxCopy();
469 Type *semantic(Loc loc, Scope *sc);
470 d_uns64 size(Loc loc);
471 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
472 Expression *defaultInit(Loc loc);
473 int isZeroInit();
474 int checkBoolean();
475 TypeInfoDeclaration *getTypeInfoDeclaration();
476 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
477 int hasPointers();
479 type *toCtype();
482 struct TypeQualified : Type
484 Loc loc;
485 Array idents; // array of Identifier's representing ident.ident.ident etc.
487 TypeQualified(TY ty, Loc loc);
488 void syntaxCopyHelper(TypeQualified *t);
489 void addIdent(Identifier *ident);
490 void toCBuffer2Helper(OutBuffer *buf, HdrGenState *hgs);
491 d_uns64 size(Loc loc);
492 void resolveHelper(Loc loc, Scope *sc, Dsymbol *s, Dsymbol *scopesym,
493 Expression **pe, Type **pt, Dsymbol **ps);
496 struct TypeIdentifier : TypeQualified
498 Identifier *ident;
500 TypeIdentifier(Loc loc, Identifier *ident);
501 Type *syntaxCopy();
502 //char *toChars();
503 void toDecoBuffer(OutBuffer *buf);
504 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
505 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
506 Dsymbol *toDsymbol(Scope *sc);
507 Type *semantic(Loc loc, Scope *sc);
508 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
509 Type *reliesOnTident();
510 Expression *toExpression();
513 /* Similar to TypeIdentifier, but with a TemplateInstance as the root
515 struct TypeInstance : TypeQualified
517 TemplateInstance *tempinst;
519 TypeInstance(Loc loc, TemplateInstance *tempinst);
520 Type *syntaxCopy();
521 //char *toChars();
522 //void toDecoBuffer(OutBuffer *buf);
523 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
524 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
525 Type *semantic(Loc loc, Scope *sc);
526 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
529 struct TypeTypeof : TypeQualified
531 Expression *exp;
533 TypeTypeof(Loc loc, Expression *exp);
534 Type *syntaxCopy();
535 Dsymbol *toDsymbol(Scope *sc);
536 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
537 Type *semantic(Loc loc, Scope *sc);
538 d_uns64 size(Loc loc);
541 struct TypeStruct : Type
543 StructDeclaration *sym;
545 TypeStruct(StructDeclaration *sym);
546 d_uns64 size(Loc loc);
547 unsigned alignsize();
548 char *toChars();
549 Type *syntaxCopy();
550 Type *semantic(Loc loc, Scope *sc);
551 Dsymbol *toDsymbol(Scope *sc);
552 void toDecoBuffer(OutBuffer *buf);
553 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
554 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
555 unsigned memalign(unsigned salign);
556 Expression *defaultInit(Loc loc);
557 int isZeroInit();
558 int checkBoolean();
559 dt_t **toDt(dt_t **pdt);
560 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
561 TypeInfoDeclaration *getTypeInfoDeclaration();
562 int hasPointers();
564 type *toCtype();
567 struct TypeEnum : Type
569 EnumDeclaration *sym;
571 TypeEnum(EnumDeclaration *sym);
572 d_uns64 size(Loc loc);
573 unsigned alignsize();
574 char *toChars();
575 Type *semantic(Loc loc, Scope *sc);
576 Dsymbol *toDsymbol(Scope *sc);
577 void toDecoBuffer(OutBuffer *buf);
578 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
579 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
580 Expression *getProperty(Loc loc, Identifier *ident);
581 int isintegral();
582 int isfloating();
583 int isscalar();
584 int isunsigned();
585 MATCH implicitConvTo(Type *to);
586 Type *toBasetype();
587 Expression *defaultInit(Loc loc);
588 int isZeroInit();
589 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
590 TypeInfoDeclaration *getTypeInfoDeclaration();
591 int hasPointers();
593 type *toCtype();
596 struct TypeTypedef : Type
598 TypedefDeclaration *sym;
600 TypeTypedef(TypedefDeclaration *sym);
601 Type *syntaxCopy();
602 d_uns64 size(Loc loc);
603 unsigned alignsize();
604 char *toChars();
605 Type *semantic(Loc loc, Scope *sc);
606 Dsymbol *toDsymbol(Scope *sc);
607 void toDecoBuffer(OutBuffer *buf);
608 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
609 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
610 Expression *getProperty(Loc loc, Identifier *ident);
611 int isbit();
612 int isintegral();
613 int isfloating();
614 int isreal();
615 int isimaginary();
616 int iscomplex();
617 int isscalar();
618 int isunsigned();
619 int checkBoolean();
620 Type *toBasetype();
621 MATCH implicitConvTo(Type *to);
622 Expression *defaultInit(Loc loc);
623 int isZeroInit();
624 dt_t **toDt(dt_t **pdt);
625 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
626 TypeInfoDeclaration *getTypeInfoDeclaration();
627 int hasPointers();
629 type *toCtype();
630 type *toCParamtype();
633 struct TypeClass : Type
635 ClassDeclaration *sym;
637 TypeClass(ClassDeclaration *sym);
638 d_uns64 size(Loc loc);
639 char *toChars();
640 Type *syntaxCopy();
641 Type *semantic(Loc loc, Scope *sc);
642 Dsymbol *toDsymbol(Scope *sc);
643 void toDecoBuffer(OutBuffer *buf);
644 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
645 Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
646 ClassDeclaration *isClassHandle();
647 int isBaseOf(Type *t, target_ptrdiff_t *poffset);
648 MATCH implicitConvTo(Type *to);
649 Expression *defaultInit(Loc loc);
650 int isZeroInit();
651 MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes);
652 int isauto();
653 int checkBoolean();
654 TypeInfoDeclaration *getTypeInfoDeclaration();
655 int hasPointers();
657 type *toCtype();
659 Symbol *toSymbol();
662 struct TypeTuple : Type
664 Arguments *arguments; // types making up the tuple
666 TypeTuple(Arguments *arguments);
667 TypeTuple(Expressions *exps);
668 Type *syntaxCopy();
669 Type *semantic(Loc loc, Scope *sc);
670 int equals(Object *o);
671 Type *reliesOnTident();
672 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
673 void toDecoBuffer(OutBuffer *buf);
674 Expression *getProperty(Loc loc, Identifier *ident);
675 TypeInfoDeclaration *getTypeInfoDeclaration();
678 struct TypeSlice : Type
680 Expression *lwr;
681 Expression *upr;
683 TypeSlice(Type *next, Expression *lwr, Expression *upr);
684 Type *syntaxCopy();
685 Type *semantic(Loc loc, Scope *sc);
686 void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
687 void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
690 /**************************************************************/
692 //enum InOut { None, In, Out, InOut, Lazy };
694 struct Argument : Object
696 //enum InOut inout;
697 unsigned storageClass;
698 Type *type;
699 Identifier *ident;
700 Expression *defaultArg;
702 Argument(unsigned storageClass, Type *type, Identifier *ident, Expression *defaultArg);
703 Argument *syntaxCopy();
704 Type *isLazyArray();
705 void toDecoBuffer(OutBuffer *buf);
706 static Arguments *arraySyntaxCopy(Arguments *args);
707 static char *argsTypesToChars(Arguments *args, int varargs);
708 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs);
709 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments);
710 static size_t dim(Arguments *arguments);
711 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL);
714 extern int PTRSIZE;
715 extern int REALSIZE;
716 extern int REALPAD;
717 extern int Tsize_t;
718 extern int Tptrdiff_t;
720 #endif
722 #endif /* DMD_MTYPE_H */