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

Unified Diff: runtime/vm/object.h

Issue 10873036: Add convenience static members of Type: Smi and Mint. (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') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 11255)
+++ runtime/vm/object.h (working copy)
@@ -561,16 +561,16 @@
// TODO(regis): Implement RemoveDirectSubclass for class unloading support.
// Check if this class represents the class of null.
- bool IsNullClass() const { return raw() == Object::null_class(); }
+ bool IsNullClass() const { return id() == kNullCid; }
// Check if this class represents the 'Dynamic' class.
- bool IsDynamicClass() const { return raw() == Object::dynamic_class(); }
+ bool IsDynamicClass() const { return id() == kDynamicCid; }
// Check if this class represents the 'void' class.
- bool IsVoidClass() const { return raw() == Object::void_class(); }
+ bool IsVoidClass() const { return id() == kVoidCid; }
// Check if this class represents the 'Object' class.
- bool IsObjectClass() const;
+ bool IsObjectClass() const { return id() == kInstanceCid; }
// Check if this class represents a signature class.
bool IsSignatureClass() const {
@@ -989,6 +989,12 @@
// The 'int' interface type.
static RawType* IntInterface();
+ // The 'Smi' type.
+ static RawType* SmiType();
+
+ // The 'Mint' type.
+ static RawType* MintType();
+
// The 'double' interface type.
static RawType* DoubleInterface();
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698