Mercurial > projects > ldc
comparison gen/toir.cpp @ 666:0d934394ada1
Implement BoolExp.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 07 Oct 2008 18:41:00 +0200 |
parents | 43d2ab9833bf |
children | 9c48213cfd96 |
comparison
equal
deleted
inserted
replaced
665:d8a1481eaa0c | 666:0d934394ada1 |
---|---|
2429 return new DVarValue(type, DtoBitCast(v, getPtrToType(DtoType(type)))); | 2429 return new DVarValue(type, DtoBitCast(v, getPtrToType(DtoType(type)))); |
2430 } | 2430 } |
2431 | 2431 |
2432 ////////////////////////////////////////////////////////////////////////////////////////// | 2432 ////////////////////////////////////////////////////////////////////////////////////////// |
2433 | 2433 |
2434 DValue* BoolExp::toElem(IRState* p) | |
2435 { | |
2436 return new DImValue(type, DtoBoolean(loc, e1->toElem(p))); | |
2437 } | |
2438 | |
2439 ////////////////////////////////////////////////////////////////////////////////////////// | |
2440 | |
2434 #define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; } | 2441 #define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; } |
2435 STUB(Expression); | 2442 STUB(Expression); |
2436 STUB(DotTypeExp); | 2443 STUB(DotTypeExp); |
2437 STUB(TypeDotIdExp); | 2444 STUB(TypeDotIdExp); |
2438 STUB(ScopeExp); | 2445 STUB(ScopeExp); |
2439 STUB(TypeExp); | 2446 STUB(TypeExp); |
2440 STUB(BoolExp); | |
2441 STUB(TupleExp); | 2447 STUB(TupleExp); |
2442 | 2448 |
2443 #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; } | 2449 #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("const Exp type "#x" not implemented: '%s' type: '%s'", toChars(), type->toChars()); fatal(); return NULL; } |
2444 CONSTSTUB(Expression); | 2450 CONSTSTUB(Expression); |
2445 CONSTSTUB(AssocArrayLiteralExp); | 2451 CONSTSTUB(AssocArrayLiteralExp); |