Resolving nested context for structs.

* * *
Another fix for nested structs
* * *
Yet another fix for nested structs
This commit is contained in:
Alexey Prokhin 2010-11-02 13:21:36 +03:00
parent e3afcf8a8d
commit 360a99caa9
7 changed files with 63 additions and 22 deletions

View file

@ -170,16 +170,7 @@ DValue* DtoNewClass(Loc loc, TypeClass* tc, NewExp* newexp)
// set the context for nested classes
else if (tc->sym->isNested() && tc->sym->vthis)
{
Logger::println("Resolving nested context");
LOG_SCOPE;
// get context
LLValue* nest = DtoNestedContext(loc, tc->sym);
// store into right location
size_t idx = tc->sym->vthis->ir.irField->index;
LLValue* gep = DtoGEPi(mem,0,idx,"tmp");
DtoStore(DtoBitCast(nest, gep->getType()->getContainedType(0)), gep);
DtoResolveNestedContext(loc, tc->sym, mem);
}
// call constructor