From 8cad8d6c7a48994fbbeedbc1c1c8f17bbaf3d8b1 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Tue, 3 Mar 2009 14:10:37 +0100 Subject: [PATCH] Merged ABI changes into D2 frontend. --- dmd2/mtype.c | 20 +++----------------- dmd2/mtype.h | 16 ++-------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/dmd2/mtype.c b/dmd2/mtype.c index bfa4fcbe..abb8739d 100644 --- a/dmd2/mtype.c +++ b/dmd2/mtype.c @@ -3045,14 +3045,9 @@ TypeFunction::TypeFunction(Arguments *parameters, Type *treturn, int varargs, en this->isnothrow = false; this->ispure = false; this->isref = false; - this->retInPtr = false; - this->usesThis = false; - this->usesNest = false; - this->structInregArg = NULL; - this->retAttrs = 0; - this->thisAttrs = 0; - this->reverseParams = false; - this->firstRealArg = 0; + + // LDC + this->fty = NULL; } Type *TypeFunction::syntaxCopy() @@ -3064,13 +3059,6 @@ Type *TypeFunction::syntaxCopy() t->isnothrow = isnothrow; t->ispure = ispure; t->isref = isref; - t->retInPtr = retInPtr; - t->usesThis = usesThis; - t->usesNest = usesNest; - t->retAttrs = retAttrs; - t->thisAttrs = thisAttrs; - t->reverseParams = reverseParams; - t->firstRealArg = firstRealArg; return t; } @@ -6119,7 +6107,6 @@ Argument::Argument(unsigned storageClass, Type *type, Identifier *ident, Express this->ident = ident; this->storageClass = storageClass; this->defaultArg = defaultArg; - this->llvmAttrs = 0; } Argument *Argument::syntaxCopy() @@ -6128,7 +6115,6 @@ Argument *Argument::syntaxCopy() type ? type->syntaxCopy() : NULL, ident, defaultArg ? defaultArg->syntaxCopy() : NULL); - a->llvmAttrs = llvmAttrs; return a; } diff --git a/dmd2/mtype.h b/dmd2/mtype.h index f75b1c7f..b33e549a 100644 --- a/dmd2/mtype.h +++ b/dmd2/mtype.h @@ -24,6 +24,7 @@ // llvm #include "../ir/irtype.h" namespace llvm { class Type; } +struct IrFuncTy; struct Scope; struct Identifier; @@ -502,17 +503,7 @@ struct TypeFunction : TypeNext unsigned totym(); // LDC - bool retInPtr; - bool usesThis; - bool usesNest; - // when the last arg is a struct and passed in EAX, this holds its real type - const llvm::Type* structInregArg; - unsigned retAttrs; - unsigned thisAttrs; // also used for nest - // parameter index in the llvm function that contains the first not-implicit arg - size_t firstRealArg; - - bool reverseParams; + IrFuncTy* fty; }; struct TypeDelegate : TypeNext @@ -802,9 +793,6 @@ struct Argument : Object static int isTPL(Arguments *arguments); static size_t dim(Arguments *arguments); static Argument *getNth(Arguments *arguments, size_t nth, size_t *pn = NULL); - - // LDC - unsigned llvmAttrs; }; extern int PTRSIZE;