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

Unified Diff: runtime/vm/tags.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/tags.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/tags.cc
diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
index 30e284c96c04d445d1edfb175ff4497a3496095c..f1cd1e0901e42b98e0cc9f0456ab3f66cee85238 100644
--- a/runtime/vm/tags.cc
+++ b/runtime/vm/tags.cc
@@ -7,8 +7,8 @@
#include "vm/isolate.h"
#include "vm/json_stream.h"
#include "vm/native_entry.h"
-#include "vm/runtime_entry.h"
#include "vm/object.h"
+#include "vm/runtime_entry.h"
namespace dart {
@@ -31,26 +31,21 @@ const char* VMTag::TagName(uword tag) {
return entry.name;
}
-
bool VMTag::IsNativeEntryTag(uword tag) {
return (tag > kLastTagId) && !IsRuntimeEntryTag(tag);
}
-
bool VMTag::IsDartTag(uword id) {
return id == kDartTagId;
}
-
bool VMTag::IsExitFrameTag(uword id) {
return (id != 0) && !IsDartTag(id) && (id != kIdleTagId) &&
(id != kVMTagId) && (id != kEmbedderTagId);
}
-
static RuntimeEntry* runtime_entry_list = NULL;
-
bool VMTag::IsRuntimeEntryTag(uword id) {
const RuntimeEntry* current = runtime_entry_list;
while (current != NULL) {
@@ -62,7 +57,6 @@ bool VMTag::IsRuntimeEntryTag(uword id) {
return false;
}
-
const char* VMTag::RuntimeEntryTagName(uword id) {
const RuntimeEntry* current = runtime_entry_list;
while (current != NULL) {
@@ -74,14 +68,12 @@ const char* VMTag::RuntimeEntryTagName(uword id) {
return NULL;
}
-
void VMTag::RegisterRuntimeEntry(RuntimeEntry* runtime_entry) {
ASSERT(runtime_entry != NULL);
runtime_entry->set_next(runtime_entry_list);
runtime_entry_list = runtime_entry;
}
-
VMTag::TagEntry VMTag::entries_[] = {
{
"InvalidTag", kInvalidTagId,
@@ -92,7 +84,6 @@ VMTag::TagEntry VMTag::entries_[] = {
{"kNumVMTags", kNumVMTags},
};
-
VMTagScope::VMTagScope(Thread* thread, uword tag, bool conditional_set)
: StackResource(thread) {
ASSERT(isolate() != NULL);
@@ -102,20 +93,17 @@ VMTagScope::VMTagScope(Thread* thread, uword tag, bool conditional_set)
}
}
-
VMTagScope::~VMTagScope() {
ASSERT(isolate() != NULL);
thread()->set_vm_tag(previous_tag_);
}
-
VMTagCounters::VMTagCounters() {
for (intptr_t i = 0; i < VMTag::kNumVMTags; i++) {
counters_[i] = 0;
}
}
-
void VMTagCounters::Increment(uword tag) {
if (VMTag::IsRuntimeEntryTag(tag)) {
counters_[VMTag::kRuntimeTagId]++;
@@ -130,14 +118,12 @@ void VMTagCounters::Increment(uword tag) {
counters_[tag]++;
}
-
int64_t VMTagCounters::count(uword tag) {
ASSERT(tag != VMTag::kInvalidTagId);
ASSERT(tag < VMTag::kNumVMTags);
return counters_[tag];
}
-
#ifndef PRODUCT
void VMTagCounters::PrintToJSONObject(JSONObject* obj) {
if (!FLAG_support_service) {
@@ -158,7 +144,6 @@ void VMTagCounters::PrintToJSONObject(JSONObject* obj) {
}
#endif // !PRODUCT
-
const char* UserTags::TagName(uword tag_id) {
ASSERT(tag_id >= kUserTagIdOffset);
ASSERT(tag_id < kUserTagIdOffset + kMaxUserTags);
@@ -169,5 +154,4 @@ const char* UserTags::TagName(uword tag_id) {
return label.ToCString();
}
-
} // namespace dart
« no previous file with comments | « runtime/vm/tags.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698