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

Unified Diff: runtime/lib/object.cc

Issue 11785006: Support Null type in Class::TypeTest and simplify Instance::IsInstanceOf. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 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 | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/object.cc
===================================================================
--- runtime/lib/object.cc (revision 16663)
+++ runtime/lib/object.cc (working copy)
@@ -61,11 +61,12 @@
DEFINE_NATIVE_ENTRY(Object_runtimeType, 1) {
const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
const Type& type = Type::Handle(instance.GetType());
+ // The static type of null is specified to be the bottom type, however, the
+ // runtime type of null is the Null type, which we correctly return here.
return type.Canonicalize();
}
-
DEFINE_NATIVE_ENTRY(Object_instanceOf, 5) {
const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
// Instantiator at position 1 is not used. It is passed along so that the call
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698