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

Unified Diff: pkg/compiler/lib/src/kernel/kernel_visitor.dart

Issue 2562703008: Add associations for more null-aware cases (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/kernel_visitor.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel_visitor.dart b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
index c232009685e03af3944eab19297faa203f393f43..a58ec7fe70ab522f44774ec35118533692736a6b 100644
--- a/pkg/compiler/lib/src/kernel/kernel_visitor.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_visitor.dart
@@ -1513,7 +1513,12 @@ class KernelVisitor extends Object
@override
ir.Expression visitIfNotNullDynamicPropertyGet(
Send node, Node receiver, Name name, _) {
- return buildNullAwarePropertyAccessor(receiver, name).buildSimpleRead();
+ Accessor accessor = buildNullAwarePropertyAccessor(receiver, name);
+ ir.Expression result = accessor.buildSimpleRead();
+ if (accessor.builtGetter != null) {
+ kernel.nodeToAst[accessor.builtGetter] = node;
+ }
+ return result;
}
@override
@@ -1526,8 +1531,10 @@ class KernelVisitor extends Object
new ir.ConditionalExpression(
buildIsNull(new ir.VariableGet(receiver)),
new ir.NullLiteral(),
- buildInvokeSelector(new ir.VariableGet(receiver), selector,
- buildArguments(arguments)),
+ associateNode(
+ buildInvokeSelector(new ir.VariableGet(receiver), selector,
+ buildArguments(arguments)),
+ receiverNode),
null));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698