mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-11-30 20:54:19 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -1173,9 +1173,6 @@ struct AddExp : BinExp
|
||||
Identifier *opId_r();
|
||||
|
||||
elem *toElem(IRState *irs);
|
||||
|
||||
// LLVMDC
|
||||
bool llvmFieldIndex;
|
||||
};
|
||||
|
||||
struct MinExp : BinExp
|
||||
|
||||
+4
-5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user