mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Merge branch 'master' into merge-2.064
Conflicts: gen/nested.cpp
This commit is contained in:
commit
b15ffe2ef0
1 changed files with 2 additions and 5 deletions
|
@ -286,7 +286,7 @@ static void DtoCreateNestedContextType(FuncDeclaration* fd) {
|
|||
fd->ir.irFunc->nestedContextCreated = true;
|
||||
|
||||
// construct nested variables array
|
||||
if (fd->closureVars.dim != 0)
|
||||
if (fd->closureVars.dim > 0)
|
||||
{
|
||||
Logger::println("has nested frame");
|
||||
// start with adding all enclosing parent frames until a static parent is reached
|
||||
|
@ -396,7 +396,7 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
|||
DtoCreateNestedContextType(fd);
|
||||
|
||||
// construct nested variables array
|
||||
if (fd->closureVars.dim != 0)
|
||||
if (fd->closureVars.dim > 0)
|
||||
{
|
||||
IrFunction* irfunction = fd->ir.irFunc;
|
||||
unsigned depth = irfunction->depth;
|
||||
|
@ -449,9 +449,6 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
|||
I != E; ++I) {
|
||||
VarDeclaration *vd = *I;
|
||||
|
||||
if (needsClosure && vd->needsAutoDtor())
|
||||
vd->error("has scoped destruction, cannot build closure");
|
||||
|
||||
LLValue* gep = DtoGEPi(frame, 0, vd->ir.irLocal->nestedIndex, vd->toChars());
|
||||
if (vd->isParameter()) {
|
||||
Logger::println("nested param: %s", vd->toChars());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue