Merge 2.058beta

This commit is contained in:
Alexey Prokhin
2012-02-12 14:42:37 +04:00
parent f2ed2e96b0
commit e74e55df89
64 changed files with 5261 additions and 2974 deletions

View File

@@ -2636,7 +2636,10 @@ DValue* FuncExp::toElem(IRState* p)
fd->codegen(Type::sir);
assert(fd->ir.irFunc->func);
if(fd->tok == TOKdelegate) {
if (fd->tok == TOKreserved && type->ty == Tpointer && fd->vthis)
fd->tok = TOKfunction;
if(fd->isNested()) {
LLType* dgty = DtoType(type);
LLValue* cval;
@@ -2673,11 +2676,9 @@ DValue* FuncExp::toElem(IRState* p)
return new DImValue(type, DtoAggrPair(cval, castfptr, ".func"));
} else if(fd->tok == TOKfunction) {
} else {
return new DImValue(type, fd->ir.irFunc->func);
}
assert(0 && "fd->tok must be TOKfunction or TOKdelegate");
}
//////////////////////////////////////////////////////////////////////////////////////////