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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 10905211: Clean up operator names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 1 month 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: dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 1ebc7109cef5b0c72cf723b88ccd8b9772ae05cf..2759c3475833a3d7ce34171153876f92b7d1f017 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -1615,12 +1615,17 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
if (node.isOperator) {
SourceString source = node.selector.asOperator().source;
String string = source.stringValue;
- if (identical(string, '!') || identical(string, '&&') || string == '||' ||
- identical(string, 'is') || identical(string, 'as') ||
+ if (identical(string, '!') ||
+ identical(string, '&&') || identical(string, '||') ||
+ identical(string, 'is') || identical(string, 'as') ||
identical(string, '===') || identical(string, '!==') ||
+ identical(string, '?') ||
identical(string, '>>>')) {
return null;
}
+ if (!isUserDefinableOperator(source.stringValue)) {
+ source = Elements.mapToUserOperator(source);
+ }
return node.arguments.isEmpty
? new Selector.unaryOperator(source)
: new Selector.binaryOperator(source);

Powered by Google App Engine
This is Rietveld 408576698