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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types.dart

Issue 14416014: After a dynamic call, refine the receiver type by looking at the potential targets of that call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/ssa/types.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/types.dart (revision 22031)
+++ sdk/lib/_internal/compiler/implementation/ssa/types.dart (working copy)
@@ -41,7 +41,9 @@
// TODO(kasperl): A lot of the code in the system currently
// expects the top type to be 'unknown'. I'll rework this.
- if (element == compiler.objectClass || element == compiler.dynamicClass) {
+ if (mask.refined == null
+ && (element == compiler.objectClass
+ || element == compiler.dynamicClass)) {
return isNullable ? HType.UNKNOWN : HType.NON_NULL;
}

Powered by Google App Engine
This is Rietveld 408576698