Mercurial > projects > ldc
diff gen/statements.cpp @ 486:a34078905d01
Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Reimplemented support for nested functions/class using a new approach.
Added error on taking address of intrinsic.
Fixed problems with the ->syntaxCopy of TypeFunction delegate exp.
Removed DtoDType and replaced all uses with ->toBasetype() instead.
Removed unused inplace stuff.
Fixed a bunch of issues in the runtime unittests, not complete yet.
Added mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 10 Aug 2008 08:37:38 +0200 |
parents | 672eb4893b55 |
children | 9534dbc70a56 |
line wrap: on
line diff
--- a/gen/statements.cpp Sat Aug 09 09:03:52 2008 +0200 +++ b/gen/statements.cpp Sun Aug 10 08:37:38 2008 +0200 @@ -57,7 +57,7 @@ { if (p->topfunc()->getReturnType() == LLType::VoidTy) { IrFunction* f = p->func(); - assert(f->type->llvmRetInPtr); + assert(f->type->retInPtr); assert(f->decl->ir.irFunc->retArg); if (global.params.symdebug) DtoDwarfStopPoint(loc.linnum); @@ -66,8 +66,7 @@ DValue* e = exp->toElem(p); - if (!e->inPlace()) - DtoAssign(loc, rvar, e); + DtoAssign(loc, rvar, e); DtoEnclosingHandlers(enclosinghandler, NULL); @@ -647,8 +646,8 @@ static LLValue* call_string_switch_runtime(llvm::GlobalVariable* table, Expression* e) { - Type* dt = DtoDType(e->type); - Type* dtnext = DtoDType(dt->next); + Type* dt = e->type->toBasetype(); + Type* dtnext = dt->next->toBasetype(); TY ty = dtnext->ty; const char* fname; if (ty == Tchar) { @@ -934,7 +933,7 @@ // what to iterate DValue* aggrval = aggr->toElem(p); - Type* aggrtype = DtoDType(aggr->type); + Type* aggrtype = aggr->type->toBasetype(); // get length and pointer LLValue* niters = DtoArrayLen(aggrval);