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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2954123002: Remove special casing of == null (Closed)
Patch Set: Created 3 years, 6 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
Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
index 2a25e1a900fa33e0d59125249bf0b4e6e4696465..a4e816e46643f95522e812001e9a3c148724382d 100644
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
@@ -580,7 +580,11 @@ class KernelAstTypeInferenceMap implements KernelToTypeInferenceMap {
if (send.name.name == '[]=') {
return closedWorld.commonMasks.dynamicType;
}
- return _resultOf(_target).typeOfSend(_astAdapter.getNode(send));
+ ast.Node node = _astAdapter.getNodeOrNull(send);
+ if (node == null) {
+ return closedWorld.commonMasks.dynamicType;
Siggi Cherem (dart-lang) 2017/06/23 20:43:37 should we list here what kind of `send` we expect
Johnni Winther 2017/06/26 10:47:40 Asserted that `send.name.name == 'null'`.
+ }
+ return _resultOf(_target).typeOfSend(node);
}
TypeMask typeOfGet(ir.PropertyGet getter) {

Powered by Google App Engine
This is Rietveld 408576698