Mercurial > projects > ldc
comparison dmd/mtype.c @ 585:fbb1a366cfbc
Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 09 Sep 2008 16:49:47 -0700 |
parents | 337554fd34f1 |
children | e6bcc4d9e5ff |
comparison
equal
deleted
inserted
replaced
584:c7d7e2282ba3 | 585:fbb1a366cfbc |
---|---|
4454 if (v->toParent() != sym) | 4454 if (v->toParent() != sym) |
4455 sym->error(e->loc, "'%s' is not a member", v->toChars()); | 4455 sym->error(e->loc, "'%s' is not a member", v->toChars()); |
4456 | 4456 |
4457 // *(&e + offset) | 4457 // *(&e + offset) |
4458 accessCheck(e->loc, sc, e, d); | 4458 accessCheck(e->loc, sc, e, d); |
4459 | |
4460 // LLVMDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain | |
4461 #ifndef IN_LLVM | |
4459 b = new AddrExp(e->loc, e); | 4462 b = new AddrExp(e->loc, e); |
4460 b->type = e->type->pointerTo(); | 4463 b->type = e->type->pointerTo(); |
4461 b = new AddExp(e->loc, b, new IntegerExp(e->loc, v->offset, Type::tint32)); | 4464 b = new AddExp(e->loc, b, new IntegerExp(e->loc, v->offset, Type::tint32)); |
4462 #if IN_LLVM | |
4463 // LLVMDC modification | |
4464 // this is *essential* | |
4465 ((AddExp*)b)->llvmFieldIndex = true; | |
4466 #endif | |
4467 b->type = v->type->pointerTo(); | 4465 b->type = v->type->pointerTo(); |
4468 e = new PtrExp(e->loc, b); | 4466 e = new PtrExp(e->loc, b); |
4469 e->type = v->type; | 4467 e->type = v->type; |
4470 return e; | 4468 return e; |
4469 #endif | |
4471 } | 4470 } |
4472 | 4471 |
4473 de = new DotVarExp(e->loc, e, d); | 4472 de = new DotVarExp(e->loc, e, d); |
4474 return de->semantic(sc); | 4473 return de->semantic(sc); |
4475 } | 4474 } |