mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +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;
|
fd->ir.irFunc->nestedContextCreated = true;
|
||||||
|
|
||||||
// construct nested variables array
|
// construct nested variables array
|
||||||
if (fd->closureVars.dim != 0)
|
if (fd->closureVars.dim > 0)
|
||||||
{
|
{
|
||||||
Logger::println("has nested frame");
|
Logger::println("has nested frame");
|
||||||
// start with adding all enclosing parent frames until a static parent is reached
|
// start with adding all enclosing parent frames until a static parent is reached
|
||||||
|
@ -396,7 +396,7 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
||||||
DtoCreateNestedContextType(fd);
|
DtoCreateNestedContextType(fd);
|
||||||
|
|
||||||
// construct nested variables array
|
// construct nested variables array
|
||||||
if (fd->closureVars.dim != 0)
|
if (fd->closureVars.dim > 0)
|
||||||
{
|
{
|
||||||
IrFunction* irfunction = fd->ir.irFunc;
|
IrFunction* irfunction = fd->ir.irFunc;
|
||||||
unsigned depth = irfunction->depth;
|
unsigned depth = irfunction->depth;
|
||||||
|
@ -449,9 +449,6 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
VarDeclaration *vd = *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());
|
LLValue* gep = DtoGEPi(frame, 0, vd->ir.irLocal->nestedIndex, vd->toChars());
|
||||||
if (vd->isParameter()) {
|
if (vd->isParameter()) {
|
||||||
Logger::println("nested param: %s", vd->toChars());
|
Logger::println("nested param: %s", vd->toChars());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue