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

Side by Side Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 1278353003: Handle more unqualified SendSets (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of tree; 5 part of tree;
6 6
7 abstract class Visitor<R> { 7 abstract class Visitor<R> {
8 const Visitor(); 8 const Visitor();
9 9
10 R visitNode(Node node); 10 R visitNode(Node node);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 SendSet.prefix(receiver, 479 SendSet.prefix(receiver,
480 selector, 480 selector,
481 this.assignmentOperator, 481 this.assignmentOperator,
482 [Node argument = null, bool isConditional = false]) 482 [Node argument = null, bool isConditional = false])
483 : super.prefix(receiver, selector, argument, isConditional); 483 : super.prefix(receiver, selector, argument, isConditional);
484 484
485 SendSet asSendSet() => this; 485 SendSet asSendSet() => this;
486 486
487 accept(Visitor visitor) => visitor.visitSendSet(this); 487 accept(Visitor visitor) => visitor.visitSendSet(this);
488 488
489 /// `true` if this send is not a simple assignment.
490 bool get isComplex => !identical(assignmentOperator.source, '=');
491
489 /// Whether this is an if-null assignment of the form `a ??= b`. 492 /// Whether this is an if-null assignment of the form `a ??= b`.
490 bool get isIfNullAssignment => 493 bool get isIfNullAssignment =>
491 identical(assignmentOperator.source, '??='); 494 identical(assignmentOperator.source, '??=');
492 495
493 visitChildren(Visitor visitor) { 496 visitChildren(Visitor visitor) {
494 super.visitChildren(visitor); 497 super.visitChildren(visitor);
495 if (assignmentOperator != null) assignmentOperator.accept(visitor); 498 if (assignmentOperator != null) assignmentOperator.accept(visitor);
496 } 499 }
497 500
498 Send copyWithReceiver(Node newReceiver, bool isConditional) { 501 Send copyWithReceiver(Node newReceiver, bool isConditional) {
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 2343
2341 // VariableDefinitions. 2344 // VariableDefinitions.
2342 get metadata => null; 2345 get metadata => null;
2343 get type => null; 2346 get type => null;
2344 2347
2345 // Typedef. 2348 // Typedef.
2346 get typeParameters => null; 2349 get typeParameters => null;
2347 get formals => null; 2350 get formals => null;
2348 get typedefKeyword => null; 2351 get typedefKeyword => null;
2349 } 2352 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/analyze_unused_dart2js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698