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

Unified Diff: src/spaces-inl.h

Issue 6880010: Merge (7265, 7271] from bleeding_edge to experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 7563)
+++ src/spaces-inl.h (working copy)
@@ -28,6 +28,7 @@
#ifndef V8_SPACES_INL_H_
#define V8_SPACES_INL_H_
+#include "isolate.h"
#include "memory.h"
#include "spaces.h"
@@ -113,11 +114,13 @@
// --------------------------------------------------------------------------
// PagedSpace
-Page* Page::Initialize(MemoryChunk* chunk,
+Page* Page::Initialize(Heap* heap,
+ MemoryChunk* chunk,
Executability executable,
PagedSpace* owner) {
Page* page = reinterpret_cast<Page*>(chunk);
- MemoryChunk::Initialize(reinterpret_cast<Address>(chunk),
+ MemoryChunk::Initialize(heap,
+ reinterpret_cast<Address>(chunk),
kPageSize,
executable,
owner);
@@ -139,7 +142,8 @@
MemoryChunk* maybe = reinterpret_cast<MemoryChunk*>(
OffsetFrom(addr) & ~Page::kPageAlignmentMask);
if (maybe->owner() != NULL) return maybe;
- LargeObjectIterator iterator(Heap::lo_space());
+ // TODO(gc) ISOLATESMERGE HEAP
+ LargeObjectIterator iterator(HEAP->lo_space());
for (HeapObject* o = iterator.next(); o != NULL; o = iterator.next()) {
// Fixed arrays are the only pointer-containing objects in large object
// space.
@@ -155,11 +159,12 @@
}
+// TODO(gc) ISOLATESMERGE HEAP
PointerChunkIterator::PointerChunkIterator()
: state_(kOldPointerState),
- old_pointer_iterator_(Heap::old_pointer_space()),
- map_iterator_(Heap::map_space()),
- lo_iterator_(Heap::lo_space()) { }
+ old_pointer_iterator_(HEAP->old_pointer_space()),
+ map_iterator_(HEAP->map_space()),
+ lo_iterator_(HEAP->lo_space()) { }
Page* Page::next_page() {
@@ -247,13 +252,18 @@
ASSERT_SEMISPACE_ALLOCATION_INFO(allocation_info_, to_space_);
int bytes_allocated = new_top - top_on_previous_step_;
- IncrementalMarking::Step(bytes_allocated);
+ heap()->incremental_marking()->Step(bytes_allocated);
top_on_previous_step_ = new_top;
return obj;
}
+intptr_t LargeObjectSpace::Available() {
+ return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
+}
+
+
template <typename StringType>
void NewSpace::ShrinkStringAtAllocationBoundary(String* string, int length) {
ASSERT(length <= string->length());
@@ -267,9 +277,9 @@
bool FreeListNode::IsFreeListNode(HeapObject* object) {
- return object->map() == Heap::raw_unchecked_free_space_map()
- || object->map() == Heap::raw_unchecked_one_pointer_filler_map()
- || object->map() == Heap::raw_unchecked_two_pointer_filler_map();
+ return object->map() == HEAP->raw_unchecked_free_space_map()
Erik Corry 2011/04/20 20:07:40 I think this needs a todo
Vyacheslav Egorov (Chromium) 2011/04/24 11:24:08 Done.
+ || object->map() == HEAP->raw_unchecked_one_pointer_filler_map()
+ || object->map() == HEAP->raw_unchecked_two_pointer_filler_map();
}
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698