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

Unified Diff: src/heap-inl.h

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with ToT Created 7 years, 6 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/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index f0861b2e7a9546eea1beb74d1991f81349e1f3d3..a295b0d06c064909d6e1f68f3f4985b2fefe61b8 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -245,6 +245,8 @@ MaybeObject* Heap::AllocateRaw(int size_in_bytes,
result = lo_space_->AllocateRaw(size_in_bytes, NOT_EXECUTABLE);
} else if (CELL_SPACE == space) {
result = cell_space_->AllocateRaw(size_in_bytes);
+ } else if (JS_GLOBAL_PROPERTY_CELL_SPACE == space) {
+ result = js_global_property_cell_space_->AllocateRaw(size_in_bytes);
} else {
ASSERT(MAP_SPACE == space);
result = map_space_->AllocateRaw(size_in_bytes);
@@ -305,7 +307,19 @@ MaybeObject* Heap::AllocateRawCell() {
isolate_->counters()->objs_since_last_full()->Increment();
isolate_->counters()->objs_since_last_young()->Increment();
#endif
- MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
+ MaybeObject* result = cell_space_->AllocateRaw(Cell::kSize);
+ if (result->IsFailure()) old_gen_exhausted_ = true;
+ return result;
+}
+
+
+MaybeObject* Heap::AllocateRawJSGlobalPropertyCell() {
+#ifdef DEBUG
+ isolate_->counters()->objs_since_last_full()->Increment();
+ isolate_->counters()->objs_since_last_young()->Increment();
+#endif
+ MaybeObject* result =
+ js_global_property_cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
if (result->IsFailure()) old_gen_exhausted_ = true;
return result;
}
@@ -407,6 +421,7 @@ AllocationSpace Heap::TargetSpaceId(InstanceType type) {
ASSERT(type != MAP_TYPE);
ASSERT(type != CODE_TYPE);
ASSERT(type != ODDBALL_TYPE);
+ ASSERT(type != CELL_TYPE);
ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE);
if (type <= LAST_NAME_TYPE) {

Powered by Google App Engine
This is Rietveld 408576698