Mercurial > projects > ldc
comparison dmd/mtype.c @ 1282:680b4df0ea36
Commit workaround for TypeFunction comparing issue.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 30 Apr 2009 23:16:21 +0200 |
parents | 7af860e4f403 |
children | 8026319762be |
comparison
equal
deleted
inserted
replaced
1281:29d3861aa2da | 1282:680b4df0ea36 |
---|---|
2808 | 2808 |
2809 // LDC: if we're not producing a mangle string, add the this | 2809 // LDC: if we're not producing a mangle string, add the this |
2810 // type to prevent merging different member function | 2810 // type to prevent merging different member function |
2811 if (!mangle && funcdecl) | 2811 if (!mangle && funcdecl) |
2812 { | 2812 { |
2813 if (AggregateDeclaration* ad = funcdecl->isMember()) | 2813 if (funcdecl->needThis()) |
2814 { | 2814 { |
2815 buf->writeByte('M'); | 2815 AggregateDeclaration* ad = funcdecl->isMember2(); |
2816 ad->type->toDecoBuffer(buf, false); | 2816 buf->writeByte('M'); |
2817 } | 2817 ad->type->toDecoBuffer(buf, false); |
2818 } | |
2819 /* BUG This causes problems with delegate types | |
2820 On the other hand, the llvm type for nested functions *is* different | |
2821 so not doing anything here may be lead to bugs! | |
2822 A sane solution would be DtoType(Dsymbol)... | |
2823 if (funcdecl->isNested()) | |
2824 { | |
2825 buf->writeByte('M'); | |
2826 if (funcdecl->toParent2() && funcdecl->toParent2()->isFuncDeclaration()) | |
2827 { | |
2828 FuncDeclaration* fd = funcdecl->toParent2()->isFuncDeclaration(); | |
2829 fd->type->toDecoBuffer(buf, false); | |
2830 } | |
2831 }*/ | |
2818 } | 2832 } |
2819 | 2833 |
2820 // Write argument types | 2834 // Write argument types |
2821 Argument::argsToDecoBuffer(buf, parameters, mangle); | 2835 Argument::argsToDecoBuffer(buf, parameters, mangle); |
2822 //if (buf->data[buf->offset - 1] == '@') halt(); | 2836 //if (buf->data[buf->offset - 1] == '@') halt(); |