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

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: Merge. 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..02a0b8287213b5ccd3f170f02c78f0027009d030 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;
@@ -255,8 +259,8 @@ class Selector {
bool appliesUntyped(Element element, Compiler compiler) {
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();
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698