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

Unified Diff: runtime/vm/object.cc

Issue 10829270: Continue work on type propagation in optimizing compiler (still WIP). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 10474)
+++ runtime/vm/object.cc (working copy)
@@ -1753,9 +1753,15 @@
}
// In the case of a subtype test, each occurrence of DynamicType in type S is
// interpreted as the bottom type, a subtype of all types.
+ // However, DynamicType is not more specific than any type.
if (IsDynamicClass()) {
return test_kind == kIsSubtypeOf;
}
+ // Check for NullType, which is not a subtype of any type, but is more
+ // specific than any type.
+ if (IsNullClass()) {
+ return test_kind == kIsMoreSpecificThan;
+ }
// Check for reflexivity.
if (raw() == other.raw()) {
const intptr_t len = NumTypeArguments();
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698