Mercurial > projects > ldc
diff gen/toir.cpp @ 90:16e88334bba7 trunk
[svn r94] started on complex support
calling final class methods was being treated as a virtual call failing an assertion.
author | lindquist |
---|---|
date | Wed, 07 Nov 2007 03:36:07 +0100 |
parents | 058d3925950e |
children | 3f949c6e2e9d |
line wrap: on
line diff
--- a/gen/toir.cpp Wed Nov 07 02:45:47 2007 +0100 +++ b/gen/toir.cpp Wed Nov 07 03:36:07 2007 +0100 @@ -318,6 +318,24 @@ ////////////////////////////////////////////////////////////////////////////////////////// +DValue* ComplexExp::toElem(IRState* p) +{ + Logger::print("ComplexExp::toElem(): %s | %s\n", toChars(), type->toChars()); + LOG_SCOPE; + assert(0); +} + +////////////////////////////////////////////////////////////////////////////////////////// + +llvm::Constant* ComplexExp::toConstElem(IRState* p) +{ + Logger::print("ComplexExp::toConstElem(): %s | %s\n", toChars(), type->toChars()); + LOG_SCOPE; + assert(0); +} + +////////////////////////////////////////////////////////////////////////////////////////// + DValue* StringExp::toElem(IRState* p) { Logger::print("StringExp::toElem: %s | %s\n", toChars(), type->toChars()); @@ -1631,7 +1649,7 @@ unsigned cc = (unsigned)-1; // virtual call - if (fdecl->isVirtual()) { + if (!fdecl->isFinal() && fdecl->isVirtual()) { assert(fdecl->vtblIndex > 0); assert(e1type->ty == Tclass); @@ -2858,7 +2876,7 @@ STUB(TypeExp); //STUB(RealExp); -STUB(ComplexExp); +//STUB(ComplexExp); //STUB(StringExp); //STUB(IntegerExp); STUB(BoolExp); @@ -2885,6 +2903,7 @@ //CONSTSTUB(IntegerExp); //CONSTSTUB(RealExp); //CONSTSTUB(NullExp); +//CONSTSTUB(ComplexExp); //CONSTSTUB(StringExp); //CONSTSTUB(VarExp); //CONSTSTUB(ArrayLiteralExp);