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

Unified Diff: runtime/vm/handles.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/handles.h ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/handles.cc
diff --git a/runtime/vm/handles.cc b/runtime/vm/handles.cc
index f3818d7cc69d0c536814e9b294a403b2eec60169..866260a42063cfa62431ff137bc82464f7fce113 100644
--- a/runtime/vm/handles.cc
+++ b/runtime/vm/handles.cc
@@ -19,7 +19,6 @@ namespace dart {
DEFINE_FLAG(bool, verify_handles, false, "Verify handles.");
-
VMHandles::~VMHandles() {
if (FLAG_trace_handles) {
OS::PrintErr("*** Handle Counts for 0x(%" Px "):Zone = %d,Scoped = %d\n",
@@ -30,13 +29,11 @@ VMHandles::~VMHandles() {
}
}
-
void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) {
return Handles<kVMHandleSizeInWords, kVMHandlesPerChunk,
kOffsetOfRawPtr>::VisitObjectPointers(visitor);
}
-
#if defined(DEBUG)
static bool IsCurrentApiNativeScope(Zone* zone) {
ApiNativeScope* scope = ApiNativeScope::Current();
@@ -44,27 +41,23 @@ static bool IsCurrentApiNativeScope(Zone* zone) {
}
#endif // DEBUG
-
uword VMHandles::AllocateHandle(Zone* zone) {
DEBUG_ASSERT(!IsCurrentApiNativeScope(zone));
return Handles<kVMHandleSizeInWords, kVMHandlesPerChunk,
kOffsetOfRawPtr>::AllocateHandle(zone);
}
-
uword VMHandles::AllocateZoneHandle(Zone* zone) {
DEBUG_ASSERT(!IsCurrentApiNativeScope(zone));
return Handles<kVMHandleSizeInWords, kVMHandlesPerChunk,
kOffsetOfRawPtr>::AllocateZoneHandle(zone);
}
-
bool VMHandles::IsZoneHandle(uword handle) {
return Handles<kVMHandleSizeInWords, kVMHandlesPerChunk,
kOffsetOfRawPtr>::IsZoneHandle(handle);
}
-
int VMHandles::ScopedHandleCount() {
Thread* thread = Thread::Current();
ASSERT(thread->zone() != NULL);
@@ -72,7 +65,6 @@ int VMHandles::ScopedHandleCount() {
return handles->CountScopedHandles();
}
-
int VMHandles::ZoneHandleCount() {
Thread* thread = Thread::Current();
ASSERT(thread->zone() != NULL);
@@ -80,7 +72,6 @@ int VMHandles::ZoneHandleCount() {
return handles->CountZoneHandles();
}
-
void HandleScope::Initialize() {
ASSERT(thread()->no_handle_scope_depth() == 0);
VMHandles* handles = thread()->zone()->handles();
@@ -93,12 +84,10 @@ void HandleScope::Initialize() {
#endif
}
-
HandleScope::HandleScope(Thread* thread) : StackResource(thread) {
Initialize();
}
-
HandleScope::~HandleScope() {
ASSERT(thread()->zone() != NULL);
VMHandles* handles = thread()->zone()->handles();
@@ -113,13 +102,11 @@ HandleScope::~HandleScope() {
#endif
}
-
#if defined(DEBUG)
NoHandleScope::NoHandleScope(Thread* thread) : StackResource(thread) {
thread->IncrementNoHandleScopeDepth();
}
-
NoHandleScope::~NoHandleScope() {
thread()->DecrementNoHandleScopeDepth();
}
« no previous file with comments | « runtime/vm/handles.h ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698