Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/closure.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart |
| index 2b0849402d20b22f767e7bcf383771021a762cb3..71ce0cb1f3a4868fd2677740641389ff683d4b2a 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/closure.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/closure.dart |
| @@ -75,6 +75,8 @@ class ClosureFieldElement extends ElementX implements VariableElement { |
| /// The source variable this element refers to. |
| final Element variableElement; |
| + List<FunctionElement> nestedClosures = new List<FunctionElement>(); |
|
ngeoffray
2013/12/05 09:29:28
What is this for a ClosureFieldElement? Please add
sigurdm
2013/12/05 11:35:03
Actually nothing - I had misunderstood what a Clos
|
| + |
| ClosureFieldElement(String name, |
| this.variableElement, |
| ClassElement enclosing) |
| @@ -700,6 +702,8 @@ class ClosureTranslator extends Visitor { |
| new FunctionElementX.from(Compiler.CALL_OPERATOR_NAME, |
| element, |
| globalizedElement); |
| + ClosureContainer enclosing = element.enclosingElement; |
| + enclosing.nestedClosures.add(callElement); |
| globalizedElement.addMember(callElement, compiler); |
| // The nested function's 'this' is the same as the one for the outer |
| // function. It could be [null] if we are inside a static method. |