Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 33ee5f3746c52de23baadc1f7bc26e431474b3ca..fa358c53929127218fbd4fd719d5bec8d3bab3b0 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2436,7 +2436,7 @@ void Heap::ScavengeObjectSlow(HeapObject** p, HeapObject* object) { |
MaybeObject* Heap::AllocatePartialMap(InstanceType instance_type, |
int instance_size) { |
Object* result; |
- MaybeObject* maybe_result = AllocateRawMap(); |
+ MaybeObject* maybe_result = AllocateRaw(Map::kSize, MAP_SPACE, MAP_SPACE); |
if (!maybe_result->ToObject(&result)) return maybe_result; |
// Map::cast cannot be used due to uninitialized map field. |
@@ -2461,7 +2461,7 @@ MaybeObject* Heap::AllocateMap(InstanceType instance_type, |
int instance_size, |
ElementsKind elements_kind) { |
Object* result; |
- MaybeObject* maybe_result = AllocateRawMap(); |
+ MaybeObject* maybe_result = AllocateRaw(Map::kSize, MAP_SPACE, MAP_SPACE); |
if (!maybe_result->To(&result)) return maybe_result; |
Map* map = reinterpret_cast<Map*>(result); |
@@ -2953,8 +2953,11 @@ MaybeObject* Heap::AllocateHeapNumber(double value, PretenureFlag pretenure) { |
MaybeObject* Heap::AllocateCell(Object* value) { |
+ int size = Cell::kSize; |
+ STATIC_ASSERT(Cell::kSize <= Page::kNonCodeObjectAreaSize); |
+ |
Object* result; |
- { MaybeObject* maybe_result = AllocateRawCell(); |
+ { MaybeObject* maybe_result = AllocateRaw(size, CELL_SPACE, CELL_SPACE); |
if (!maybe_result->ToObject(&result)) return maybe_result; |
} |
HeapObject::cast(result)->set_map_no_write_barrier(cell_map()); |
@@ -2964,8 +2967,12 @@ MaybeObject* Heap::AllocateCell(Object* value) { |
MaybeObject* Heap::AllocatePropertyCell() { |
+ int size = PropertyCell::kSize; |
+ STATIC_ASSERT(PropertyCell::kSize <= Page::kNonCodeObjectAreaSize); |
+ |
Object* result; |
- MaybeObject* maybe_result = AllocateRawPropertyCell(); |
+ MaybeObject* maybe_result = |
+ AllocateRaw(size, PROPERTY_CELL_SPACE, PROPERTY_CELL_SPACE); |
if (!maybe_result->ToObject(&result)) return maybe_result; |
HeapObject::cast(result)->set_map_no_write_barrier( |