Chromium Code Reviews| Index: runtime/vm/raw_object.h |
| diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
| index bada55697e0f465b212e51cc6692285ea029a340..977ba55040acdc93904c958016db44714e6dce62 100644 |
| --- a/runtime/vm/raw_object.h |
| +++ b/runtime/vm/raw_object.h |
| @@ -433,27 +433,30 @@ class RawObject { |
| } |
| #define DEFINE_IS_CID(clazz) \ |
| - bool Is##clazz() { return ((GetClassId() == k##clazz##Cid)); } |
| + bool Is##clazz() const { return ((GetClassId() == k##clazz##Cid)); } |
| CLASS_LIST(DEFINE_IS_CID) |
| #undef DEFINE_IS_CID |
| #define DEFINE_IS_CID(clazz) \ |
| - bool IsTypedData##clazz() { \ |
| + bool IsTypedData##clazz() const { \ |
| return ((GetClassId() == kTypedData##clazz##Cid)); \ |
| } \ |
| - bool IsTypedDataView##clazz() { \ |
| - return ((GetClassId() == kTypedDataView##clazz##Cid)); \ |
| + bool IsTypedDataView##clazz() const { \ |
|
rmacnak
2016/05/05 18:15:15
IsTypedData##clazz##View then?
|
| + return ((GetClassId() == kTypedData##clazz##ViewCid)); \ |
| } \ |
| - bool IsExternalTypedData##clazz() { \ |
| + bool IsExternalTypedData##clazz() const { \ |
| return ((GetClassId() == kExternalTypedData##clazz##Cid)); \ |
| - } \ |
| + } |
| CLASS_LIST_TYPED_DATA(DEFINE_IS_CID) |
| #undef DEFINE_IS_CID |
| - bool IsDartInstance() { |
| + bool IsStringInstance() const { |
| + return IsStringClassId(GetClassId()); |
| + } |
| + bool IsDartInstance() const { |
| return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); |
| } |
| - bool IsFreeListElement() { |
| + bool IsFreeListElement() const { |
| return ((GetClassId() == kFreeListElement)); |
| } |