| Index: src/spaces.h
|
| ===================================================================
|
| --- src/spaces.h (revision 9808)
|
| +++ src/spaces.h (working copy)
|
| @@ -459,7 +459,6 @@
|
| live_byte_count_ = 0;
|
| }
|
| void IncrementLiveBytes(int by) {
|
| - ASSERT_LE(static_cast<unsigned>(live_byte_count_), size_);
|
| if (FLAG_gc_verbose) {
|
| printf("UpdateLiveBytes:%p:%x%c=%x->%x\n",
|
| static_cast<void*>(this), live_byte_count_,
|
| @@ -642,7 +641,6 @@
|
| // [page_addr + kObjectStartOffset .. page_addr + kPageSize].
|
| INLINE(static Page* FromAllocationTop(Address top)) {
|
| Page* p = FromAddress(top - kPointerSize);
|
| - ASSERT_PAGE_OFFSET(p->Offset(top));
|
| return p;
|
| }
|
|
|
| @@ -666,7 +664,6 @@
|
| // Returns the offset of a given address to this page.
|
| INLINE(int Offset(Address a)) {
|
| int offset = static_cast<int>(a - address());
|
| - ASSERT_PAGE_OFFSET(offset);
|
| return offset;
|
| }
|
|
|
| @@ -1134,11 +1131,6 @@
|
| Address end,
|
| PageMode mode,
|
| HeapObjectCallback size_func);
|
| -
|
| -#ifdef DEBUG
|
| - // Verifies whether fields have valid values.
|
| - void Verify();
|
| -#endif
|
| };
|
|
|
|
|
| @@ -1741,7 +1733,6 @@
|
| reinterpret_cast<Address>(reinterpret_cast<uintptr_t>(address_in_page) &
|
| ~Page::kPageAlignmentMask);
|
| NewSpacePage* page = reinterpret_cast<NewSpacePage*>(page_start);
|
| - ASSERT(page->InNewSpace());
|
| return page;
|
| }
|
|
|
| @@ -1818,7 +1809,6 @@
|
|
|
| // Returns the start address of the current page of the space.
|
| Address page_low() {
|
| - ASSERT(anchor_.next_page() != &anchor_);
|
| return current_page_->body();
|
| }
|
|
|
| @@ -2084,7 +2074,7 @@
|
|
|
| // Return the current capacity of a semispace.
|
| intptr_t EffectiveCapacity() {
|
| - ASSERT(to_space_.Capacity() == from_space_.Capacity());
|
| + SLOW_ASSERT(to_space_.Capacity() == from_space_.Capacity());
|
| return (to_space_.Capacity() / Page::kPageSize) * Page::kObjectAreaSize;
|
| }
|
|
|
| @@ -2100,10 +2090,9 @@
|
| return Capacity();
|
| }
|
|
|
| - // Return the available bytes without growing or switching page in the
|
| - // active semispace.
|
| + // Return the available bytes without growing.
|
| intptr_t Available() {
|
| - return allocation_info_.limit - allocation_info_.top;
|
| + return Capacity() - Size();
|
| }
|
|
|
| // Return the maximum capacity of a semispace.
|
| @@ -2317,9 +2306,9 @@
|
| // For contiguous spaces, top should be in the space (or at the end) and limit
|
| // should be the end of the space.
|
| #define ASSERT_SEMISPACE_ALLOCATION_INFO(info, space) \
|
| - ASSERT((space).page_low() <= (info).top \
|
| - && (info).top <= (space).page_high() \
|
| - && (info).limit <= (space).page_high())
|
| + SLOW_ASSERT((space).page_low() <= (info).top \
|
| + && (info).top <= (space).page_high() \
|
| + && (info).limit <= (space).page_high())
|
|
|
|
|
| // -----------------------------------------------------------------------------
|
| @@ -2447,7 +2436,7 @@
|
|
|
| class LargeObjectSpace : public Space {
|
| public:
|
| - LargeObjectSpace(Heap* heap, AllocationSpace id);
|
| + LargeObjectSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id);
|
| virtual ~LargeObjectSpace() {}
|
|
|
| // Initializes internal data structures.
|
| @@ -2517,6 +2506,7 @@
|
| bool SlowContains(Address addr) { return !FindObject(addr)->IsFailure(); }
|
|
|
| private:
|
| + intptr_t max_capacity_;
|
| // The head of the linked list of large object chunks.
|
| LargePage* first_page_;
|
| intptr_t size_; // allocated bytes
|
|
|