Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 223403003: Use closure tracer to identify closures that are not passed to Function.apply (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix regression in emitted meta data Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7b1f02d7ec3417e3bcb7904fc9c57577d0a84177..b94c1c00474a5f3cb13485386a7d6e2d5267db8b 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -10,7 +10,8 @@ import "dart_types.dart";
import "scanner/scannerlib.dart" show Token;
import "tree/tree.dart";
import "util/util.dart";
-import "elements/modelx.dart" show ElementX, FunctionElementX, ClassElementX;
+import "elements/modelx.dart" show ElementX, SynthesizedCallMethodElementX,
+ ClassElementX;
import "elements/visitor.dart" show ElementVisitor;
class ClosureNamer {
@@ -147,7 +148,7 @@ class ClosureClassElement extends ClassElementX {
Node parseNode(DiagnosticListener listener) => node;
/**
- * The most outer method this closure is declared into.
+ * The element for the declaration of the function expression.
*/
final TypedElement methodElement;
@@ -716,9 +717,9 @@ class ClosureTranslator extends Visitor {
ClassElement globalizedElement = new ClosureClassElement(
node, closureName, compiler, element, element.getCompilationUnit());
FunctionElement callElement =
- new FunctionElementX.from(Compiler.CALL_OPERATOR_NAME,
- element,
- globalizedElement);
+ new SynthesizedCallMethodElementX(Compiler.CALL_OPERATOR_NAME,
+ element,
+ globalizedElement);
ClosureContainer enclosing = element.enclosingElement;
enclosing.nestedClosures.add(callElement);
globalizedElement.addMember(callElement, compiler);

Powered by Google App Engine
This is Rietveld 408576698