Make Heap::AllocateRaw private.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/238443016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9ef20a1e
......@@ -993,15 +993,6 @@ class Heap {
// data and clearing the resource pointer.
inline void FinalizeExternalString(String* string);
// Allocates an uninitialized object. The memory is non-executable if the
// hardware and OS allow.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
// failed.
// Please note this function does not perform a garbage collection.
MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes,
AllocationSpace space,
AllocationSpace retry_space);
// Initialize a filler object to keep the ability to iterate over the heap
// when shortening objects.
void CreateFillerObjectAt(Address addr, int size);
......@@ -1998,6 +1989,14 @@ class Heap {
return (pretenure == TENURED) ? preferred_old_space : NEW_SPACE;
}
// Allocates an uninitialized object. The memory is non-executable if the
// hardware and OS allow. This is the single choke-point for allocations
// performed by the runtime and should not be bypassed (to extend this to
// inlined allocations, use the Heap::DisableInlineAllocation() support).
MUST_USE_RESULT inline MaybeObject* AllocateRaw(int size_in_bytes,
AllocationSpace space,
AllocationSpace retry_space);
// Allocate an uninitialized fixed array.
MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(
int length, PretenureFlag pretenure);
......
......@@ -3542,8 +3542,8 @@ TEST(Regress169928) {
// We need filler the size of AllocationMemento object, plus an extra
// fill pointer value.
MaybeObject* maybe_object = CcTest::heap()->AllocateRaw(
AllocationMemento::kSize + kPointerSize, NEW_SPACE, OLD_POINTER_SPACE);
MaybeObject* maybe_object = CcTest::heap()->new_space()->AllocateRaw(
AllocationMemento::kSize + kPointerSize);
Object* obj = NULL;
CHECK(maybe_object->ToObject(&obj));
Address addr_obj = reinterpret_cast<Address>(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment