Mercurial > projects > ldc
comparison dmd/mtype.c @ 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 | 47f8b54f90b3 |
children | 4d366a75d95f |
comparison
equal
deleted
inserted
replaced
1023:ca191c141cec | 1024:9167d492cbc2 |
---|---|
2657 // assert(treturn); | 2657 // assert(treturn); |
2658 this->parameters = parameters; | 2658 this->parameters = parameters; |
2659 this->varargs = varargs; | 2659 this->varargs = varargs; |
2660 this->linkage = linkage; | 2660 this->linkage = linkage; |
2661 this->inuse = 0; | 2661 this->inuse = 0; |
2662 this->retInPtr = false; | 2662 |
2663 this->usesThis = false; | 2663 // LDC |
2664 this->usesNest = false; | 2664 this->fty = NULL; |
2665 this->structInregArg = NULL; | |
2666 this->retAttrs = 0; | |
2667 this->thisAttrs = 0; | |
2668 this->reverseParams = false; | |
2669 this->firstRealArg = 0; | |
2670 } | 2665 } |
2671 | 2666 |
2672 Type *TypeFunction::syntaxCopy() | 2667 Type *TypeFunction::syntaxCopy() |
2673 { | 2668 { |
2674 Type *treturn = next ? next->syntaxCopy() : NULL; | 2669 Type *treturn = next ? next->syntaxCopy() : NULL; |
2675 Arguments *params = Argument::arraySyntaxCopy(parameters); | 2670 Arguments *params = Argument::arraySyntaxCopy(parameters); |
2676 TypeFunction *t = new TypeFunction(params, treturn, varargs, linkage); | 2671 TypeFunction *t = new TypeFunction(params, treturn, varargs, linkage); |
2677 t->retInPtr = retInPtr; | |
2678 t->usesThis = usesThis; | |
2679 t->usesNest = usesNest; | |
2680 t->retAttrs = retAttrs; | |
2681 t->thisAttrs = thisAttrs; | |
2682 t->reverseParams = reverseParams; | |
2683 t->firstRealArg = firstRealArg; | |
2684 return t; | 2672 return t; |
2685 } | 2673 } |
2686 | 2674 |
2687 /******************************* | 2675 /******************************* |
2688 * Returns: | 2676 * Returns: |
5314 { | 5302 { |
5315 this->type = type; | 5303 this->type = type; |
5316 this->ident = ident; | 5304 this->ident = ident; |
5317 this->storageClass = storageClass; | 5305 this->storageClass = storageClass; |
5318 this->defaultArg = defaultArg; | 5306 this->defaultArg = defaultArg; |
5319 this->llvmAttrs = 0; | |
5320 } | 5307 } |
5321 | 5308 |
5322 Argument *Argument::syntaxCopy() | 5309 Argument *Argument::syntaxCopy() |
5323 { | 5310 { |
5324 Argument *a = new Argument(storageClass, | 5311 Argument *a = new Argument(storageClass, |
5325 type ? type->syntaxCopy() : NULL, | 5312 type ? type->syntaxCopy() : NULL, |
5326 ident, | 5313 ident, |
5327 defaultArg ? defaultArg->syntaxCopy() : NULL); | 5314 defaultArg ? defaultArg->syntaxCopy() : NULL); |
5328 a->llvmAttrs = llvmAttrs; | |
5329 return a; | 5315 return a; |
5330 } | 5316 } |
5331 | 5317 |
5332 Arguments *Argument::arraySyntaxCopy(Arguments *args) | 5318 Arguments *Argument::arraySyntaxCopy(Arguments *args) |
5333 { Arguments *a = NULL; | 5319 { Arguments *a = NULL; |