Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.

This commit is contained in:
Tomas Lindquist Olsen
2008-09-09 16:49:47 -07:00
parent 4e0b6b4bf0
commit 8e9b957bce
21 changed files with 179 additions and 229 deletions
-1
View File
@@ -7929,7 +7929,6 @@ Expression *XorAssignExp::semantic(Scope *sc)
AddExp::AddExp(Loc loc, Expression *e1, Expression *e2)
: BinExp(loc, TOKadd, sizeof(AddExp), e1, e2)
{
llvmFieldIndex = false;
}
Expression *AddExp::semantic(Scope *sc)
-3
View File
@@ -1173,9 +1173,6 @@ struct AddExp : BinExp
Identifier *opId_r();
elem *toElem(IRState *irs);
// LLVMDC
bool llvmFieldIndex;
};
struct MinExp : BinExp
+4 -5
View File
@@ -4456,18 +4456,17 @@ L1:
// *(&e + offset)
accessCheck(e->loc, sc, e, d);
// LLVMDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain
#ifndef IN_LLVM
b = new AddrExp(e->loc, e);
b->type = e->type->pointerTo();
b = new AddExp(e->loc, b, new IntegerExp(e->loc, v->offset, Type::tint32));
#if IN_LLVM
// LLVMDC modification
// this is *essential*
((AddExp*)b)->llvmFieldIndex = true;
#endif
b->type = v->type->pointerTo();
e = new PtrExp(e->loc, b);
e->type = v->type;
return e;
#endif
}
de = new DotVarExp(e->loc, e, d);