| Index: src/crankshaft/hydrogen.cc
|
| diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
|
| index 910e1734905acf39d479d6b9634ee36831b4f366..2d0f755e4e3bf874ea2c3c8e01ec0d9ca85b18b3 100644
|
| --- a/src/crankshaft/hydrogen.cc
|
| +++ b/src/crankshaft/hydrogen.cc
|
| @@ -5051,17 +5051,23 @@ void HOptimizedGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) {
|
| // space for nested functions that don't need pretenuring.
|
| HConstant* shared_info_value = Add<HConstant>(shared_info);
|
| HInstruction* instr;
|
| + Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate());
|
| + HValue* vector_value = Add<HConstant>(vector);
|
| + int index = TypeFeedbackVector::GetIndex(expr->LiteralFeedbackSlot());
|
| + HValue* index_value = Add<HConstant>(index);
|
| if (!expr->pretenure()) {
|
| Callable callable = CodeFactory::FastNewClosure(isolate());
|
| - HValue* values[] = {shared_info_value};
|
| + HValue* values[] = {shared_info_value, vector_value, index_value};
|
| HConstant* stub_value = Add<HConstant>(callable.code());
|
| instr = New<HCallWithDescriptor>(stub_value, 0, callable.descriptor(),
|
| ArrayVector(values));
|
| } else {
|
| Add<HPushArguments>(shared_info_value);
|
| + Add<HPushArguments>(vector_value);
|
| + Add<HPushArguments>(index_value);
|
| Runtime::FunctionId function_id =
|
| expr->pretenure() ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure;
|
| - instr = New<HCallRuntime>(Runtime::FunctionForId(function_id), 1);
|
| + instr = New<HCallRuntime>(Runtime::FunctionForId(function_id), 3);
|
| }
|
| return ast_context()->ReturnInstruction(instr, expr->id());
|
| }
|
|
|