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

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

Issue 11860008: Stop passing library elements to tons of namer functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Diff against https://codereview.chromium.org/11819060/. Created 7 years, 11 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/universe/universe.dart
diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
index 572755391ba9f42c53d3a3b01aba2c4371750a31..67c61bcf181fec2971aa8e7025858634da9cf495 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
@@ -226,6 +226,10 @@ class Selector {
/** Check whether this is a call to 'assert'. */
bool isAssert() => isCall() && identical(name.stringValue, "assert");
+ /** Check whether this is a closure invocation call. */
+ bool isClosureCall() =>
+ isCall() && identical(name.stringValue, Compiler.CALL_OPERATOR_NAME);
+
int get hashCode => argumentCount + 1000 * namedArguments.length;
int get namedArgumentCount => namedArguments.length;
int get positionalArgumentCount => argumentCount - namedArgumentCount;
@@ -254,9 +258,10 @@ class Selector {
=> appliesUntyped(element, compiler);
bool appliesUntyped(Element element, Compiler compiler) {
+ assert(name == element.name);
if (Elements.isUnresolved(element)) return false;
+ if (name.isPrivate() && library != element.getLibrary()) return false;
if (element.isForeign(compiler)) return true;
-
if (element.isSetter()) return isSetter();
if (element.isGetter()) return isGetter() || isCall();
if (element.isField()) return isGetter() || isSetter() || isCall();

Powered by Google App Engine
This is Rietveld 408576698