| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 843be65710acfbefdd16144fde51eb49ea70b003..a0f4ed1526d63e49625b88510c3040cbebf12230 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -7384,8 +7384,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
|
| @@ -7401,8 +7399,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);
|
|
|