Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 5b484cca78e1558c880bbf89b5f219243eb04ee6..bc2a7026f5a1c4bddc2311245d15a83c29f6da3e 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -2356,21 +2356,25 @@ void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { |
} |
} |
-// CreateClosure <index> <tenured> |
+// CreateClosure <index> <slot> <tenured> |
// |
// Creates a new closure for SharedFunctionInfo at position |index| in the |
// constant pool and with the PretenureFlag <tenured>. |
void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* shared = __ LoadConstantPoolEntry(index); |
- Node* flags = __ BytecodeOperandFlag(1); |
+ Node* flags = __ BytecodeOperandFlag(2); |
Node* context = __ GetContext(); |
Label call_runtime(assembler, Label::kDeferred); |
Node* fast_new_closure = __ Word32And( |
flags, __ Int32Constant(CreateClosureFlags::FastNewClosureBit::kMask)); |
__ GotoUnless(fast_new_closure, &call_runtime); |
- __ SetAccumulator(FastNewClosureStub::Generate(assembler, shared, context)); |
+ Node* vector_index = __ BytecodeOperandIdx(1); |
+ vector_index = __ SmiTag(vector_index); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ __ SetAccumulator(FastNewClosureStub::Generate( |
+ assembler, shared, type_feedback_vector, vector_index, context)); |
__ Dispatch(); |
__ Bind(&call_runtime); |
@@ -2379,8 +2383,12 @@ void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { |
Node* tenured_raw = __ Word32And( |
flags, __ Int32Constant(CreateClosureFlags::PretenuredBit::kMask)); |
Node* tenured = __ SmiTag(tenured_raw); |
- Node* result = __ CallRuntime(Runtime::kInterpreterNewClosure, context, |
- shared, tenured); |
+ type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ vector_index = __ BytecodeOperandIdx(1); |
+ vector_index = __ SmiTag(vector_index); |
+ Node* result = |
+ __ CallRuntime(Runtime::kInterpreterNewClosure, context, shared, |
+ type_feedback_vector, vector_index, tenured); |
__ SetAccumulator(result); |
__ Dispatch(); |
} |