comparison dmd/mtype.c @ 486:a34078905d01

Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in. Reimplemented support for nested functions/class using a new approach. Added error on taking address of intrinsic. Fixed problems with the ->syntaxCopy of TypeFunction delegate exp. Removed DtoDType and replaced all uses with ->toBasetype() instead. Removed unused inplace stuff. Fixed a bunch of issues in the runtime unittests, not complete yet. Added mini tests.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 10 Aug 2008 08:37:38 +0200
parents cc40db549aea
children 822774a94750
comparison
equal deleted inserted replaced
485:50f6e2337a6b 486:a34078905d01
2649 // assert(treturn); 2649 // assert(treturn);
2650 this->parameters = parameters; 2650 this->parameters = parameters;
2651 this->varargs = varargs; 2651 this->varargs = varargs;
2652 this->linkage = linkage; 2652 this->linkage = linkage;
2653 this->inuse = 0; 2653 this->inuse = 0;
2654 this->llvmRetInPtr = false; 2654 this->retInPtr = false;
2655 this->llvmUsesThis = false; 2655 this->usesThis = false;
2656 this->llvmRetAttrs = 0; 2656 this->usesNest = false;
2657 this->retAttrs = 0;
2657 } 2658 }
2658 2659
2659 Type *TypeFunction::syntaxCopy() 2660 Type *TypeFunction::syntaxCopy()
2660 { 2661 {
2661 Type *treturn = next ? next->syntaxCopy() : NULL; 2662 Type *treturn = next ? next->syntaxCopy() : NULL;
2662 Arguments *params = Argument::arraySyntaxCopy(parameters); 2663 Arguments *params = Argument::arraySyntaxCopy(parameters);
2663 TypeFunction *t = new TypeFunction(params, treturn, varargs, linkage); 2664 TypeFunction *t = new TypeFunction(params, treturn, varargs, linkage);
2664 t->llvmRetInPtr = llvmRetInPtr; 2665 t->retInPtr = retInPtr;
2665 t->llvmUsesThis = llvmUsesThis; 2666 t->usesThis = usesThis;
2666 t->llvmRetAttrs = llvmRetAttrs; 2667 t->usesNest = usesNest;
2668 t->retAttrs = retAttrs;
2667 return t; 2669 return t;
2668 } 2670 }
2669 2671
2670 /******************************* 2672 /*******************************
2671 * Returns: 2673 * Returns:
3811 char *TypeEnum::toChars() 3813 char *TypeEnum::toChars()
3812 { 3814 {
3813 return sym->toChars(); 3815 return sym->toChars();
3814 } 3816 }
3815 3817
3818 Type *TypeEnum::syntaxCopy()
3819 {
3820 return this;
3821 }
3822
3816 Type *TypeEnum::semantic(Loc loc, Scope *sc) 3823 Type *TypeEnum::semantic(Loc loc, Scope *sc)
3817 { 3824 {
3818 sym->semantic(sc); 3825 sym->semantic(sc);
3819 return merge(); 3826 return merge();
3820 } 3827 }