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

Unified Diff: runtime/vm/become.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/atomic_win.h ('k') | runtime/vm/benchmark_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/become.cc
diff --git a/runtime/vm/become.cc b/runtime/vm/become.cc
index 142169aae76bbfea2a4015231046f0ca29223134..207a771d756430b60080880c20948d4587245a28 100644
--- a/runtime/vm/become.cc
+++ b/runtime/vm/become.cc
@@ -35,13 +35,11 @@ ForwardingCorpse* ForwardingCorpse::AsForwarder(uword addr, intptr_t size) {
return result;
}
-
void ForwardingCorpse::InitOnce() {
ASSERT(sizeof(ForwardingCorpse) == kObjectAlignment);
ASSERT(OFFSET_OF(ForwardingCorpse, tags_) == Object::tags_offset());
}
-
// Free list elements are used as a marker for forwarding objects. This is
// safe because we cannot reach free list elements from live objects. Ideally
// forwarding objects would have their own class id. See TODO below.
@@ -49,7 +47,6 @@ static bool IsForwardingObject(RawObject* object) {
return object->IsHeapObject() && object->IsForwardingCorpse();
}
-
static RawObject* GetForwardedObject(RawObject* object) {
ASSERT(IsForwardingObject(object));
uword addr = reinterpret_cast<uword>(object) - kHeapObjectTag;
@@ -57,7 +54,6 @@ static RawObject* GetForwardedObject(RawObject* object) {
return forwarder->target();
}
-
static void ForwardObjectTo(RawObject* before_obj, RawObject* after_obj) {
const intptr_t size_before = before_obj->Size();
@@ -75,7 +71,6 @@ static void ForwardObjectTo(RawObject* before_obj, RawObject* after_obj) {
}
}
-
class ForwardPointersVisitor : public ObjectPointerVisitor {
public:
explicit ForwardPointersVisitor(Isolate* isolate)
@@ -107,7 +102,6 @@ class ForwardPointersVisitor : public ObjectPointerVisitor {
DISALLOW_COPY_AND_ASSIGN(ForwardPointersVisitor);
};
-
class ForwardHeapPointersVisitor : public ObjectVisitor {
public:
explicit ForwardHeapPointersVisitor(ForwardPointersVisitor* pointer_visitor)
@@ -124,7 +118,6 @@ class ForwardHeapPointersVisitor : public ObjectVisitor {
DISALLOW_COPY_AND_ASSIGN(ForwardHeapPointersVisitor);
};
-
class ForwardHeapPointersHandleVisitor : public HandleVisitor {
public:
ForwardHeapPointersHandleVisitor()
@@ -147,7 +140,6 @@ class ForwardHeapPointersHandleVisitor : public HandleVisitor {
DISALLOW_COPY_AND_ASSIGN(ForwardHeapPointersHandleVisitor);
};
-
// On IA32, object pointers are embedded directly in the instruction stream,
// which is normally write-protected, so we need to make it temporarily writable
// to forward the pointers. On all other architectures, object pointers are
@@ -178,20 +170,17 @@ class WritableCodeLiteralsScope : public ValueObject {
};
#endif
-
void Become::MakeDummyObject(const Instance& instance) {
// Make the forward pointer point to itself.
// This is needed to distinguish it from a real forward object.
ForwardObjectTo(instance.raw(), instance.raw());
}
-
static bool IsDummyObject(RawObject* object) {
if (!object->IsForwardingCorpse()) return false;
return GetForwardedObject(object) == object;
}
-
void Become::CrashDump(RawObject* before_obj, RawObject* after_obj) {
OS::PrintErr("DETECTED FATAL ISSUE IN BECOME MAPPINGS\n");
@@ -220,7 +209,6 @@ void Become::CrashDump(RawObject* before_obj, RawObject* after_obj) {
}
}
-
void Become::ElementsForwardIdentity(const Array& before, const Array& after) {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
« no previous file with comments | « runtime/vm/atomic_win.h ('k') | runtime/vm/benchmark_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698