Mercurial > projects > ldc
comparison dmd/mtype.h @ 1024:9167d492cbc2
Abstracted more (most) ABI details out of the normal codegen.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Mar 2009 02:51:21 +0100 |
parents | a904cc9bc064 |
children | 4d366a75d95f |
comparison
equal
deleted
inserted
replaced
1023:ca191c141cec | 1024:9167d492cbc2 |
---|---|
22 #include "expression.h" | 22 #include "expression.h" |
23 | 23 |
24 // llvm | 24 // llvm |
25 #include "../ir/irtype.h" | 25 #include "../ir/irtype.h" |
26 namespace llvm { class Type; } | 26 namespace llvm { class Type; } |
27 struct IrFuncTy; | |
27 | 28 |
28 struct Scope; | 29 struct Scope; |
29 struct Identifier; | 30 struct Identifier; |
30 struct Expression; | 31 struct Expression; |
31 struct StructDeclaration; | 32 struct StructDeclaration; |
434 enum RET retStyle(); | 435 enum RET retStyle(); |
435 | 436 |
436 unsigned totym(); | 437 unsigned totym(); |
437 | 438 |
438 // LDC | 439 // LDC |
439 bool retInPtr; | 440 IrFuncTy* fty; |
440 bool usesThis; | |
441 bool usesNest; | |
442 // when the last arg is a struct and passed in EAX, this holds its real type | |
443 const llvm::Type* structInregArg; | |
444 unsigned retAttrs; | |
445 unsigned thisAttrs; // also used for nest | |
446 // parameter index in the llvm function that contains the first not-implicit arg | |
447 size_t firstRealArg; | |
448 | |
449 bool reverseParams; | |
450 }; | 441 }; |
451 | 442 |
452 struct TypeDelegate : Type | 443 struct TypeDelegate : Type |
453 { | 444 { |
454 TypeDelegate(Type *t); | 445 TypeDelegate(Type *t); |
697 static char *argsTypesToChars(Arguments *args, int varargs); | 688 static char *argsTypesToChars(Arguments *args, int varargs); |
698 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); | 689 static void argsToCBuffer(OutBuffer *buf, HdrGenState *hgs, Arguments *arguments, int varargs); |
699 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments); | 690 static void argsToDecoBuffer(OutBuffer *buf, Arguments *arguments); |
700 static size_t dim(Arguments *arguments); | 691 static size_t dim(Arguments *arguments); |
701 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); | 692 static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); |
702 | |
703 // LDC | |
704 unsigned llvmAttrs; | |
705 }; | 693 }; |
706 | 694 |
707 extern int PTRSIZE; | 695 extern int PTRSIZE; |
708 extern int REALSIZE; | 696 extern int REALSIZE; |
709 extern int REALPAD; | 697 extern int REALPAD; |