Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 8345912cf79220428ae3541726b267ceb3b1e67d..ecd25e1b0bc76c67b8db7d76cfed9391cb00b02b 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -2438,6 +2438,8 @@ void GetPropertyStub::GenerateAssembly( |
// static |
compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler, |
compiler::Node* shared_info, |
+ compiler::Node* feedback_vector, |
+ compiler::Node* slot, |
compiler::Node* context) { |
typedef compiler::Node Node; |
typedef compiler::CodeAssembler::Label Label; |
@@ -2551,14 +2553,14 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler, |
// Initialize the rest of the function. |
Node* empty_fixed_array = |
assembler->HeapConstant(factory->empty_fixed_array()); |
- Node* empty_literals_array = |
- assembler->HeapConstant(factory->empty_literals_array()); |
assembler->StoreObjectFieldNoWriteBarrier(result, JSObject::kPropertiesOffset, |
empty_fixed_array); |
assembler->StoreObjectFieldNoWriteBarrier(result, JSObject::kElementsOffset, |
empty_fixed_array); |
+ Node* literals_array = assembler->LoadFixedArrayElement( |
+ feedback_vector, slot, 0, CodeStubAssembler::SMI_PARAMETERS); |
assembler->StoreObjectFieldNoWriteBarrier(result, JSFunction::kLiteralsOffset, |
- empty_literals_array); |
+ literals_array); |
assembler->StoreObjectFieldNoWriteBarrier( |
result, JSFunction::kPrototypeOrInitialMapOffset, |
assembler->TheHoleConstant()); |
@@ -2584,11 +2586,13 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler, |
void FastNewClosureStub::GenerateAssembly( |
compiler::CodeAssemblerState* state) const { |
- typedef compiler::Node Node; |
CodeStubAssembler assembler(state); |
+ typedef compiler::Node Node; |
Node* shared = assembler.Parameter(Descriptor::kSharedFunctionInfo); |
Node* context = assembler.Parameter(Descriptor::kContext); |
- assembler.Return(Generate(&assembler, shared, context)); |
+ Node* vector = assembler.Parameter(Descriptor::kVector); |
+ Node* slot = assembler.Parameter(Descriptor::kSlot); |
+ assembler.Return(Generate(&assembler, shared, vector, slot, context)); |
} |
// static |