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

Unified Diff: src/heap/spaces-inl.h

Issue 437993003: Move a bunch of GC related files to heap/ subdirectory (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make presubmit happy Created 6 years, 4 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 | « src/heap/spaces.cc ('k') | src/heap/sweeper-thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces-inl.h
diff --git a/src/spaces-inl.h b/src/heap/spaces-inl.h
similarity index 90%
rename from src/spaces-inl.h
rename to src/heap/spaces-inl.h
index d5b7b2d1167f55d1f992c29f0c9e55cba15eaa1e..56c2bad70c5dd6f73d3033b14e95be87bc58dc87 100644
--- a/src/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_SPACES_INL_H_
-#define V8_SPACES_INL_H_
+#ifndef V8_HEAP_SPACES_INL_H_
+#define V8_HEAP_SPACES_INL_H_
+#include "src/heap/spaces.h"
#include "src/heap-profiler.h"
#include "src/isolate.h"
-#include "src/spaces.h"
#include "src/v8memory.h"
namespace v8 {
@@ -31,12 +31,10 @@ void Bitmap::Clear(MemoryChunk* chunk) {
PageIterator::PageIterator(PagedSpace* space)
: space_(space),
prev_page_(&space->anchor_),
- next_page_(prev_page_->next_page()) { }
+ next_page_(prev_page_->next_page()) {}
-bool PageIterator::has_next() {
- return next_page_ != &space_->anchor_;
-}
+bool PageIterator::has_next() { return next_page_ != &space_->anchor_; }
Page* PageIterator::next() {
@@ -54,12 +52,12 @@ Page* PageIterator::next() {
NewSpacePageIterator::NewSpacePageIterator(NewSpace* space)
: prev_page_(NewSpacePage::FromAddress(space->ToSpaceStart())->prev_page()),
next_page_(NewSpacePage::FromAddress(space->ToSpaceStart())),
- last_page_(NewSpacePage::FromLimit(space->ToSpaceEnd())) { }
+ last_page_(NewSpacePage::FromLimit(space->ToSpaceEnd())) {}
NewSpacePageIterator::NewSpacePageIterator(SemiSpace* space)
: prev_page_(space->anchor()),
next_page_(prev_page_->next_page()),
- last_page_(prev_page_->prev_page()) { }
+ last_page_(prev_page_->prev_page()) {}
NewSpacePageIterator::NewSpacePageIterator(Address start, Address limit)
: prev_page_(NewSpacePage::FromAddress(start)->prev_page()),
@@ -69,9 +67,7 @@ NewSpacePageIterator::NewSpacePageIterator(Address start, Address limit)
}
-bool NewSpacePageIterator::has_next() {
- return prev_page_ != last_page_;
-}
+bool NewSpacePageIterator::has_next() { return prev_page_ != last_page_; }
NewSpacePage* NewSpacePageIterator::next() {
@@ -113,8 +109,7 @@ void MemoryAllocator::Protect(Address start, size_t size) {
}
-void MemoryAllocator::Unprotect(Address start,
- size_t size,
+void MemoryAllocator::Unprotect(Address start, size_t size,
Executability executable) {
base::OS::Unprotect(start, size, executable);
}
@@ -137,9 +132,7 @@ void MemoryAllocator::UnprotectChunkFromPage(Page* page) {
// --------------------------------------------------------------------------
// PagedSpace
-Page* Page::Initialize(Heap* heap,
- MemoryChunk* chunk,
- Executability executable,
+Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
PagedSpace* owner) {
Page* page = reinterpret_cast<Page*>(chunk);
DCHECK(page->area_size() <= kMaxRegularHeapObjectSize);
@@ -209,7 +202,7 @@ PointerChunkIterator::PointerChunkIterator(Heap* heap)
: state_(kOldPointerState),
old_pointer_iterator_(heap->old_pointer_space()),
map_iterator_(heap->map_space()),
- lo_iterator_(heap->lo_space()) { }
+ lo_iterator_(heap->lo_space()) {}
Page* Page::next_page() {
@@ -305,11 +298,11 @@ intptr_t LargeObjectSpace::Available() {
bool FreeListNode::IsFreeListNode(HeapObject* object) {
Map* map = object->map();
Heap* heap = object->GetHeap();
- return map == heap->raw_unchecked_free_space_map()
- || map == heap->raw_unchecked_one_pointer_filler_map()
- || map == heap->raw_unchecked_two_pointer_filler_map();
+ return map == heap->raw_unchecked_free_space_map() ||
+ map == heap->raw_unchecked_one_pointer_filler_map() ||
+ map == heap->raw_unchecked_two_pointer_filler_map();
}
+}
+} // namespace v8::internal
-} } // namespace v8::internal
-
-#endif // V8_SPACES_INL_H_
+#endif // V8_HEAP_SPACES_INL_H_
« no previous file with comments | « src/heap/spaces.cc ('k') | src/heap/sweeper-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698