[svn r296] Removed: the 'suite' dir, it never took off!

Fixed: foreach statement, key-type checks were buggy.
Fixed: setting LLVMDC versions on the command line is now an error.
Fixed: array compare runtime had incorrect param attrs on call.
Fixed: index expressions on dynamic array slices w/o storage was broken.
Fixed: scope classes had incorrect finalization in some cases.
Fixed: when outputting !ClassInfoS !OffsetTypeInfoS, static class members were trying to be included, crashing the compiler.
Fixed: calling LLVMDC with -inline but not any -O option caused assertion failure.
Changed: the runtime now uses a single interface to "get" to !TypeInfoS, part of eliminating duplicate !TypeInfo codegen.
This commit is contained in:
Tomas Lindquist Olsen
2008-06-19 17:30:32 +02:00
parent f235b71c7b
commit 928f7d4de5
19 changed files with 76 additions and 177 deletions

View File

@@ -124,7 +124,7 @@ DValue* DeclarationExp::toElem(IRState* p)
else if (TypedefDeclaration* tdef = declaration->isTypedefDeclaration())
{
Logger::println("TypedefDeclaration");
tdef->type->getTypeInfo(NULL);
DtoTypeInfoOf(tdef->type, false);
}
// attribute declaration
else if (AttribDeclaration* a = declaration->isAttribDeclaration())
@@ -287,12 +287,9 @@ LLConstant* VarExp::toConstElem(IRState* p)
}
else if (TypeInfoDeclaration* ti = var->isTypeInfoDeclaration())
{
DtoForceDeclareDsymbol(ti);
assert(ti->ir.getIrValue());
const LLType* vartype = DtoType(type);
LLConstant* m = isaConstant(ti->ir.getIrValue());
assert(m);
if (ti->ir.getIrValue()->getType() != getPtrToType(vartype))
LLConstant* m = DtoTypeInfoOf(ti->tinfo, false);
if (m->getType() != getPtrToType(vartype))
m = llvm::ConstantExpr::getBitCast(m, vartype);
return m;
}
@@ -1512,8 +1509,7 @@ DValue* IndexExp::toElem(IRState* p)
arrptr = DtoGEP(l->getRVal(), zero, r->getRVal());
}
else if (e1type->ty == Tarray) {
arrptr = DtoGEP(l->getRVal(),zero,one);
arrptr = DtoLoad(arrptr);
arrptr = DtoArrayPtr(l);
arrptr = DtoGEP1(arrptr,r->getRVal());
}
else if (e1type->ty == Taarray) {
@@ -1982,10 +1978,9 @@ DValue* DeleteExp::toElem(IRState* p)
}
else if (DVarValue* vv = dval->isVar()) {
if (vv->var && vv->var->onstack) {
if (tc->sym->dtors.dim > 0) {
if (tc->sym->dtors.dim > 0)
DtoFinalizeClass(dval->getRVal());
onstack = true;
}
onstack = true;
}
}
if (!onstack) {
@@ -2496,29 +2491,6 @@ DValue* CatExp::toElem(IRState* p)
{
return DtoCatArrayElement(type, e1, e2);
}
/*
IRExp* ex = p->topexp();
if (ex && ex->e2 == this) {
assert(ex->v);
if (arrNarr)
DtoCatArrays(ex->v->getLVal(),e1,e2);
else
DtoCatArrayElement(ex->v->getLVal(),e1,e2);
return new DImValue(type, ex->v->getLVal(), true);
}
else {
assert(t->ty == Tarray);
const LLType* arrty = DtoType(t);
LLValue* dst = new llvm::AllocaInst(arrty, "tmpmem", p->topallocapoint());
if (arrNarr)
DtoCatAr
DtoCatArrays(dst,e1,e2);
else
DtoCatArrayElement(dst,e1,e2);
return new DVarValue(type, dst, true);
}
*/
}
//////////////////////////////////////////////////////////////////////////////////////////