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

Unified Diff: runtime/vm/raw_object.h

Issue 1952023002: Minor cleanup based on profiler output of CompileParseFunction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/profiler_service.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698