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

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

Issue 1842033004: Add *IndexSetIfNull methods to SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 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 | « pkg/compiler/lib/src/info/send_info.dart ('k') | 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/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 69f9786762cba834502d2289cdf71c6c16386915..b72dba8ae19031d22902ccae954fd38fb13aa8d4 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -3214,8 +3214,12 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
registry.registerDynamicUse(
new DynamicUse(operatorSelector, null));
- SendStructure sendStructure =
- new CompoundIndexSetStructure(semantics, operator);
+ SendStructure sendStructure;
+ if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+ sendStructure = new IndexSetIfNullStructure(semantics);
+ } else {
+ sendStructure = new CompoundIndexSetStructure(semantics, operator);
+ }
registry.registerSendStructure(node, sendStructure);
return const NoneResult();
}
@@ -3338,8 +3342,12 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
registry.registerDynamicUse(
new DynamicUse(operatorSelector, null));
- SendStructure sendStructure =
- new CompoundIndexSetStructure(semantics, operator);
+ SendStructure sendStructure;
+ if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+ sendStructure = new IndexSetIfNullStructure(semantics);
+ } else {
+ sendStructure = new CompoundIndexSetStructure(semantics, operator);
+ }
registry.registerSendStructure(node, sendStructure);
return const NoneResult();
}
« no previous file with comments | « pkg/compiler/lib/src/info/send_info.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698