mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Fix #125 – Nested class context pointer invalid (D1).
Patch originally by Alexey Prokhin, thanks.
This commit is contained in:
parent
67f12fe8b5
commit
cef19fb225
2 changed files with 23 additions and 11 deletions
|
@ -725,13 +725,6 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
fd->vthis->ir.irParam->isVthis = true;
|
||||
|
||||
DtoDwarfLocalVariable(thismem, fd->vthis);
|
||||
|
||||
#if DMDV1
|
||||
if (fd->vthis->nestedref)
|
||||
{
|
||||
fd->nestedVars.insert(fd->vthis);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// give the 'nestArg' storage
|
||||
|
@ -790,12 +783,18 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
}
|
||||
}
|
||||
|
||||
// need result variable? (nested)
|
||||
|
||||
#if DMDV1
|
||||
// need result variable? (nested)
|
||||
if (fd->vresult && fd->vresult->nestedref) {
|
||||
Logger::println("nested vresult value: %s", fd->vresult->toChars());
|
||||
fd->nestedVars.insert(fd->vresult);
|
||||
}
|
||||
|
||||
if (fd->vthis && fd->vthis->nestedref && !fd->nestedVars.empty()) {
|
||||
Logger::println("nested vthis value: %s", fd->vthis->toChars());
|
||||
fd->nestedVars.insert(fd->vthis);
|
||||
}
|
||||
#endif
|
||||
|
||||
FuncGen fg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue