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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.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: 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/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 87828ea0989020930d9fa18c86a63e945ffb918d..f6fd7d4288c6f54fc8a2e38d532859865ce0896d 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -346,6 +346,8 @@ class ErroneousElementX extends ElementX implements ErroneousElement {
get nestedClosures => unsupported();
bool get isRedirectingFactory => unsupported();
+ bool get mightBePassedToFunctionApply => unsupported();
+ set mightBePassedToFunctionApply(bool value) => unsupported();
setPatch(patch) => unsupported();
computeSignature(compiler) => unsupported();
@@ -1499,6 +1501,8 @@ class FunctionElementX extends ElementX with AnalyzableElement
final bool _hasNoBody;
+ bool mightBePassedToFunctionApply = false;
+
/**
* If this is a redirecting factory, [defaultImplementation] will be
* changed by the resolver to point to the redirection target.
@@ -1523,14 +1527,6 @@ class FunctionElementX extends ElementX with AnalyzableElement
: this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null,
false);
- FunctionElementX.from(String name,
- FunctionElement other,
- Element enclosing)
- : this.tooMuchOverloading(name, other.node, other.kind,
- other.modifiers, enclosing,
- other.functionSignature,
- false);
-
FunctionElementX.tooMuchOverloading(String name,
FunctionExpression this.cachedNode,
ElementKind kind,
@@ -1664,6 +1660,25 @@ class FunctionElementX extends ElementX with AnalyzableElement
accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
}
+class SynthesizedCallMethodElementX extends FunctionElementX {
+ final FunctionElement expression;
+
+ SynthesizedCallMethodElementX(String name,
+ FunctionElement other,
+ Element enclosing)
+ : expression = other,
+ super.tooMuchOverloading(name, other.node, other.kind,
+ other.modifiers, enclosing,
+ other.functionSignature,
+ false);
+
+ bool get mightBePassedToFunctionApply =>
+ expression.mightBePassedToFunctionApply;
+ void set mightBePassedToFunctionApply(_) =>
+ throw new UnsupportedError("Cannot set mightBePassedToFunctionApply for "
+ "synthezised call method");
+}
+
class DeferredLoaderGetterElementX extends FunctionElementX {
final PrefixElement prefix;

Powered by Google App Engine
This is Rietveld 408576698