| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index e9779fd0e31d3ec7823089b4924b84a8e667a7a2..11095b784d1ab72d55257c22a501a577378700c5 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -7252,8 +7252,6 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
|
| HConstant* context = Add<HConstant>(Handle<Context>(target->context()));
|
| inner_env->BindContext(context);
|
|
|
| - Add<HSimulate>(return_id);
|
| - current_block()->UpdateEnvironment(inner_env);
|
| HArgumentsObject* arguments_object = NULL;
|
|
|
| // If the function uses arguments object create and bind one, also copy
|
| @@ -7269,8 +7267,17 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
|
| }
|
| }
|
|
|
| + // Capture the state before invoking the inlined function for deopt in the
|
| + // inlined function. This simulate has no bailout-id since it's not directly
|
| + // reachable for deopt, and is only used to capture the state. If the simulate
|
| + // becomes reachable by merging, the ast id of the simulate merged into it is
|
| + // adopted.
|
| + Add<HSimulate>(BailoutId::None());
|
| +
|
| + current_block()->UpdateEnvironment(inner_env);
|
| +
|
| HEnterInlined* enter_inlined =
|
| - Add<HEnterInlined>(target, arguments_count, function,
|
| + Add<HEnterInlined>(return_id, target, arguments_count, function,
|
| function_state()->inlining_kind(),
|
| function->scope()->arguments(),
|
| arguments_object);
|
|
|