Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 12d5234d300793fde8aa53ac350e64348c00eaa2..f3a3a73a003f74db220700dc94362730ad04211c 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -432,39 +432,30 @@ class RawObject { |
return TryAcquireTagBit<RememberedBit>(); |
} |
+#define DEFINE_IS_CID(clazz) \ |
+ bool Is##clazz() { return ((GetClassId() == k##clazz##Cid)); } |
+CLASS_LIST(DEFINE_IS_CID) |
+#undef DEFINE_IS_CID |
+ |
+#define DEFINE_IS_CID(clazz) \ |
+ bool IsTypedData##clazz() { \ |
+ return ((GetClassId() == kTypedData##clazz##Cid)); \ |
+ } \ |
+ bool IsTypedDataView##clazz() { \ |
+ return ((GetClassId() == kTypedDataView##clazz##Cid)); \ |
+ } \ |
+ bool IsExternalTypedData##clazz() { \ |
+ return ((GetClassId() == kExternalTypedData##clazz##Cid)); \ |
+ } \ |
+CLASS_LIST_TYPED_DATA(DEFINE_IS_CID) |
+#undef DEFINE_IS_CID |
+ |
bool IsDartInstance() { |
return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); |
} |
bool IsFreeListElement() { |
return ((GetClassId() == kFreeListElement)); |
} |
- bool IsScript() { |
- return ((GetClassId() == kScriptCid)); |
- } |
- bool IsField() { |
- return ((GetClassId() == kFieldCid)); |
- } |
- bool IsFunction() { |
- return ((GetClassId() == kFunctionCid)); |
- } |
- bool IsInstructions() { |
- return ((GetClassId() == kInstructionsCid)); |
- } |
- bool IsCode() { |
- return ((GetClassId() == kCodeCid)); |
- } |
- bool IsString() { |
- return IsStringClassId(GetClassId()); |
rmacnak
2016/05/05 03:58:29
This isn't the same as GetClassId() == kStringCid.
|
- } |
- bool IsStackmap() { |
- return ((GetClassId() == kStackmapCid)); |
- } |
- bool IsPcDescriptors() { |
- return ((GetClassId() == kPcDescriptorsCid)); |
- } |
- bool IsOneByteString() { |
- return ((GetClassId() == kOneByteStringCid)); |
- } |
intptr_t Size() const { |
uword tags = ptr()->tags_; |