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

Unified Diff: pkg/compiler/lib/src/resolution/operators.dart

Issue 1001863003: Update SemanticVisitor with visitIndex, visitSuperIndex (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update analyze_unused_dart2js_test. Created 5 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/operators.dart
diff --git a/pkg/compiler/lib/src/resolution/operators.dart b/pkg/compiler/lib/src/resolution/operators.dart
index 242a53a73f24aace15de9056e33495d73fef6b66..3207acaec082c2161cfd424e165b88d534ee95ec 100644
--- a/pkg/compiler/lib/src/resolution/operators.dart
+++ b/pkg/compiler/lib/src/resolution/operators.dart
@@ -205,6 +205,10 @@ class AssignmentOperator {
const AssignmentOperator._(this.kind, this.name, this.binaryOperator,
{this.isUserDefinable: true});
+ String get selectorName {
+ return binaryOperator != null ? binaryOperator.selectorName: null;
+ }
+
String toString() => name;
/// The = operator.
@@ -294,18 +298,21 @@ enum IncDecOperatorKind {
class IncDecOperator {
final IncDecOperatorKind kind;
final String name;
+ final BinaryOperator binaryOperator;
+
+ const IncDecOperator._(this.kind, this.name, this.binaryOperator);
- const IncDecOperator._(this.kind, this.name);
+ String get selectorName => binaryOperator.selectorName;
String toString() => name;
/// The prefix/postfix ++ operator.
static const IncDecOperator INC =
- const IncDecOperator._(IncDecOperatorKind.INC, '++');
+ const IncDecOperator._(IncDecOperatorKind.INC, '++', BinaryOperator.ADD);
/// The prefix/postfix -- operator.
static const IncDecOperator DEC =
- const IncDecOperator._(IncDecOperatorKind.DEC, '--');
+ const IncDecOperator._(IncDecOperatorKind.DEC, '--', BinaryOperator.SUB);
static IncDecOperator parse(String value) {
switch (value) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698