| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 56a0dd7e6d81c98e59d7e6fc401f4ad072f6b930..8c2b4e78fa289e26b09e1cf538a283866b4e2d5e 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -5410,97 +5410,6 @@ MaybeObject* Heap::AllocatePrivateSymbol() {
|
| }
|
|
|
|
|
| -MaybeObject* Heap::AllocateGlobalContext(JSFunction* function,
|
| - ScopeInfo* scope_info) {
|
| - Object* result;
|
| - { MaybeObject* maybe_result =
|
| - AllocateFixedArray(scope_info->ContextLength(), TENURED);
|
| - if (!maybe_result->ToObject(&result)) return maybe_result;
|
| - }
|
| - Context* context = reinterpret_cast<Context*>(result);
|
| - context->set_map_no_write_barrier(global_context_map());
|
| - context->set_closure(function);
|
| - context->set_previous(function->context());
|
| - context->set_extension(scope_info);
|
| - context->set_global_object(function->context()->global_object());
|
| - ASSERT(context->IsGlobalContext());
|
| - ASSERT(result->IsContext());
|
| - return context;
|
| -}
|
| -
|
| -
|
| -MaybeObject* Heap::AllocateFunctionContext(int length, JSFunction* function) {
|
| - ASSERT(length >= Context::MIN_CONTEXT_SLOTS);
|
| - Object* result;
|
| - { MaybeObject* maybe_result = AllocateFixedArray(length);
|
| - if (!maybe_result->ToObject(&result)) return maybe_result;
|
| - }
|
| - Context* context = reinterpret_cast<Context*>(result);
|
| - context->set_map_no_write_barrier(function_context_map());
|
| - context->set_closure(function);
|
| - context->set_previous(function->context());
|
| - context->set_extension(Smi::FromInt(0));
|
| - context->set_global_object(function->context()->global_object());
|
| - return context;
|
| -}
|
| -
|
| -
|
| -MaybeObject* Heap::AllocateCatchContext(JSFunction* function,
|
| - Context* previous,
|
| - String* name,
|
| - Object* thrown_object) {
|
| - STATIC_ASSERT(Context::MIN_CONTEXT_SLOTS == Context::THROWN_OBJECT_INDEX);
|
| - Object* result;
|
| - { MaybeObject* maybe_result =
|
| - AllocateFixedArray(Context::MIN_CONTEXT_SLOTS + 1);
|
| - if (!maybe_result->ToObject(&result)) return maybe_result;
|
| - }
|
| - Context* context = reinterpret_cast<Context*>(result);
|
| - context->set_map_no_write_barrier(catch_context_map());
|
| - context->set_closure(function);
|
| - context->set_previous(previous);
|
| - context->set_extension(name);
|
| - context->set_global_object(previous->global_object());
|
| - context->set(Context::THROWN_OBJECT_INDEX, thrown_object);
|
| - return context;
|
| -}
|
| -
|
| -
|
| -MaybeObject* Heap::AllocateWithContext(JSFunction* function,
|
| - Context* previous,
|
| - JSReceiver* extension) {
|
| - Object* result;
|
| - { MaybeObject* maybe_result = AllocateFixedArray(Context::MIN_CONTEXT_SLOTS);
|
| - if (!maybe_result->ToObject(&result)) return maybe_result;
|
| - }
|
| - Context* context = reinterpret_cast<Context*>(result);
|
| - context->set_map_no_write_barrier(with_context_map());
|
| - context->set_closure(function);
|
| - context->set_previous(previous);
|
| - context->set_extension(extension);
|
| - context->set_global_object(previous->global_object());
|
| - return context;
|
| -}
|
| -
|
| -
|
| -MaybeObject* Heap::AllocateBlockContext(JSFunction* function,
|
| - Context* previous,
|
| - ScopeInfo* scope_info) {
|
| - Object* result;
|
| - { MaybeObject* maybe_result =
|
| - AllocateFixedArrayWithHoles(scope_info->ContextLength());
|
| - if (!maybe_result->ToObject(&result)) return maybe_result;
|
| - }
|
| - Context* context = reinterpret_cast<Context*>(result);
|
| - context->set_map_no_write_barrier(block_context_map());
|
| - context->set_closure(function);
|
| - context->set_previous(previous);
|
| - context->set_extension(scope_info);
|
| - context->set_global_object(previous->global_object());
|
| - return context;
|
| -}
|
| -
|
| -
|
| MaybeObject* Heap::AllocateStruct(InstanceType type) {
|
| Map* map;
|
| switch (type) {
|
|
|