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

Unified Diff: vm/heap.h

Issue 11265026: - Consolidate code into the old generation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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
« vm/gc_sweeper.cc ('K') | « vm/gc_sweeper.cc ('k') | vm/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/heap.h
===================================================================
--- vm/heap.h (revision 14048)
+++ vm/heap.h (working copy)
@@ -60,13 +60,13 @@
case kNew:
// Do not attempt to allocate very large objects in new space.
if (!PageSpace::IsPageAllocatableSize(size)) {
- return AllocateOld(size);
+ return AllocateOld(size, HeapPage::kData);
}
return AllocateNew(size);
case kOld:
- return AllocateOld(size);
+ return AllocateOld(size, HeapPage::kData);
case kCode:
- return AllocateCode(code_space_, size);
+ return AllocateOld(size, HeapPage::kExecutable);
default:
UNREACHABLE();
}
@@ -79,9 +79,9 @@
case kNew:
return new_space_->TryAllocate(size);
case kOld:
- return old_space_->TryAllocate(size);
+ return old_space_->TryAllocate(size, HeapPage::kData);
case kCode:
- return code_space_->TryAllocate(size);
+ return old_space_->TryAllocate(size, HeapPage::kExecutable);
default:
UNREACHABLE();
}
@@ -101,7 +101,6 @@
// Visit all pointers in the space.
void IterateNewPointers(ObjectPointerVisitor* visitor);
void IterateOldPointers(ObjectPointerVisitor* visitor);
- void IterateCodePointers(ObjectPointerVisitor* visitor);
// Visit all objects.
void IterateObjects(ObjectVisitor* visitor);
@@ -109,7 +108,6 @@
// Visit all object in the space.
void IterateNewObjects(ObjectVisitor* visitor);
void IterateOldObjects(ObjectVisitor* visitor);
- void IterateCodeObjects(ObjectVisitor* visitor);
// Find an object by visiting all pointers in the specified heap space,
// the 'visitor' is used to determine if an object is found or not.
@@ -171,13 +169,11 @@
Heap();
uword AllocateNew(intptr_t size);
- uword AllocateOld(intptr_t size);
- uword AllocateCode(PageSpace* space, intptr_t size);
+ uword AllocateOld(intptr_t size, HeapPage::PageType type);
// The different spaces used for allocation.
Scavenger* new_space_;
PageSpace* old_space_;
- PageSpace* code_space_;
// This heap is in read-only mode: No allocation is allowed.
bool read_only_;
« vm/gc_sweeper.cc ('K') | « vm/gc_sweeper.cc ('k') | vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698