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

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

Issue 1152903003: Create SendStructure for unary and binary in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 5 years, 7 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 | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/send_structure.dart
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index bfac00369b868e02b971a81e985a73a1e5262003..e4f99ae0f2e9f8ae95d95b22aebb48ffeb00338d 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -766,10 +766,7 @@ class NotStructure<R, A> implements SendStructure<R, A> {
/// The target of the negation.
final AccessSemantics semantics;
- // TODO(johnniwinther): Should we store this?
- final Selector selector;
-
- NotStructure(this.semantics, this.selector);
+ NotStructure(this.semantics);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
@@ -785,7 +782,7 @@ class NotStructure<R, A> implements SendStructure<R, A> {
throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}");
}
- String toString() => 'not($selector,$semantics)';
+ String toString() => 'not($semantics)';
}
/// The structure for a [Send] that is an invocation of a user definable unary
@@ -797,11 +794,7 @@ class UnaryStructure<R, A> implements SendStructure<R, A> {
/// The user definable unary operator.
final UnaryOperator operator;
- // TODO(johnniwinther): Should we store this?
- /// The [Selector] for the unary operator invocation.
- final Selector selector;
-
- UnaryStructure(this.semantics, this.operator, this.selector);
+ UnaryStructure(this.semantics, this.operator);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
@@ -856,11 +849,7 @@ class IndexStructure<R, A> implements SendStructure<R, A> {
/// The target of the left operand.
final AccessSemantics semantics;
- // TODO(johnniwinther): Should we store this?
- /// The [Selector] for the `[]` invocation.
- final Selector selector;
-
- IndexStructure(this.semantics, this.selector);
+ IndexStructure(this.semantics);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
@@ -896,11 +885,7 @@ class EqualsStructure<R, A> implements SendStructure<R, A> {
/// The target of the left operand.
final AccessSemantics semantics;
- // TODO(johnniwinther): Should we store this?
- /// The [Selector] for the `==` invocation.
- final Selector selector;
-
- EqualsStructure(this.semantics, this.selector);
+ EqualsStructure(this.semantics);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
@@ -932,11 +917,7 @@ class NotEqualsStructure<R, A> implements SendStructure<R, A> {
/// The target of the left operand.
final AccessSemantics semantics;
- // TODO(johnniwinther): Should we store this?
- /// The [Selector] for the underlying `==` invocation.
- final Selector selector;
-
- NotEqualsStructure(this.semantics, this.selector);
+ NotEqualsStructure(this.semantics);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
@@ -972,11 +953,7 @@ class BinaryStructure<R, A> implements SendStructure<R, A> {
/// The user definable binary operator.
final BinaryOperator operator;
- // TODO(johnniwinther): Should we store this?
- /// The [Selector] for the binary operator invocation.
- final Selector selector;
-
- BinaryStructure(this.semantics, this.operator, this.selector);
+ BinaryStructure(this.semantics, this.operator);
R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
switch (semantics.kind) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_resolver.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698