| Index: src/code-stubs.cc
|
| diff --git a/src/code-stubs.cc b/src/code-stubs.cc
|
| index bfa5294b04e2cf7375f4deff2225c97ab2d937ef..cedb5357495059d52fecae88e25d16810aef7c3a 100644
|
| --- a/src/code-stubs.cc
|
| +++ b/src/code-stubs.cc
|
| @@ -2330,87 +2330,6 @@ void GetPropertyStub::GenerateAssembly(
|
| assembler.Return(var_result.value());
|
| }
|
|
|
| -
|
| -// static
|
| -int FastNewFunctionContextStub::MaximumSlots() {
|
| - return FLAG_test_small_max_function_context_stub_size ? kSmallMaximumSlots
|
| - : kMaximumSlots;
|
| -}
|
| -
|
| -// static
|
| -compiler::Node* FastNewFunctionContextStub::Generate(
|
| - CodeStubAssembler* assembler, compiler::Node* function,
|
| - compiler::Node* slots, compiler::Node* context, ScopeType scope_type) {
|
| - typedef compiler::Node Node;
|
| -
|
| - slots = assembler->ChangeUint32ToWord(slots);
|
| -
|
| - // TODO(ishell): Use CSA::OptimalParameterMode() here.
|
| - CodeStubAssembler::ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
|
| - Node* min_context_slots =
|
| - assembler->IntPtrConstant(Context::MIN_CONTEXT_SLOTS);
|
| - Node* length = assembler->IntPtrAdd(slots, min_context_slots);
|
| - Node* size =
|
| - assembler->GetFixedArrayAllocationSize(length, FAST_ELEMENTS, mode);
|
| -
|
| - // Create a new closure from the given function info in new space
|
| - Node* function_context = assembler->Allocate(size);
|
| -
|
| - Heap::RootListIndex context_type;
|
| - switch (scope_type) {
|
| - case EVAL_SCOPE:
|
| - context_type = Heap::kEvalContextMapRootIndex;
|
| - break;
|
| - case FUNCTION_SCOPE:
|
| - context_type = Heap::kFunctionContextMapRootIndex;
|
| - break;
|
| - default:
|
| - UNREACHABLE();
|
| - }
|
| - assembler->StoreMapNoWriteBarrier(function_context, context_type);
|
| - assembler->StoreObjectFieldNoWriteBarrier(
|
| - function_context, Context::kLengthOffset, assembler->SmiTag(length));
|
| -
|
| - // Set up the fixed slots.
|
| - assembler->StoreFixedArrayElement(function_context, Context::CLOSURE_INDEX,
|
| - function, SKIP_WRITE_BARRIER);
|
| - assembler->StoreFixedArrayElement(function_context, Context::PREVIOUS_INDEX,
|
| - context, SKIP_WRITE_BARRIER);
|
| - assembler->StoreFixedArrayElement(function_context, Context::EXTENSION_INDEX,
|
| - assembler->TheHoleConstant(),
|
| - SKIP_WRITE_BARRIER);
|
| -
|
| - // Copy the native context from the previous context.
|
| - Node* native_context = assembler->LoadNativeContext(context);
|
| - assembler->StoreFixedArrayElement(function_context,
|
| - Context::NATIVE_CONTEXT_INDEX,
|
| - native_context, SKIP_WRITE_BARRIER);
|
| -
|
| - // Initialize the rest of the slots to undefined.
|
| - Node* undefined = assembler->UndefinedConstant();
|
| - assembler->BuildFastFixedArrayForEach(
|
| - function_context, FAST_ELEMENTS, min_context_slots, length,
|
| - [assembler, undefined](Node* context, Node* offset) {
|
| - assembler->StoreNoWriteBarrier(MachineRepresentation::kTagged, context,
|
| - offset, undefined);
|
| - },
|
| - mode);
|
| -
|
| - return function_context;
|
| -}
|
| -
|
| -void FastNewFunctionContextStub::GenerateAssembly(
|
| - compiler::CodeAssemblerState* state) const {
|
| - typedef compiler::Node Node;
|
| - CodeStubAssembler assembler(state);
|
| - Node* function = assembler.Parameter(Descriptor::kFunction);
|
| - Node* slots = assembler.Parameter(Descriptor::kSlots);
|
| - Node* context = assembler.Parameter(Descriptor::kContext);
|
| -
|
| - assembler.Return(
|
| - Generate(&assembler, function, slots, context, scope_type()));
|
| -}
|
| -
|
| // static
|
| compiler::Node* FastCloneRegExpStub::Generate(CodeStubAssembler* assembler,
|
| compiler::Node* closure,
|
|
|