| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index c8aca403e26d5a675475880faafd9b3957e9ec47..d3515829a219ed5a7755d337d0740c7339c0acc5 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -6997,6 +6997,17 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
|
| return false;
|
| }
|
|
|
| +#if V8_TARGET_ARCH_A64
|
| + // Target must be able to use caller's context.
|
| + CompilationInfo* outer_info = current_info();
|
| + if (target->context() != outer_info->closure()->context() ||
|
| + outer_info->scope()->contains_with() ||
|
| + outer_info->scope()->num_heap_slots() > 0) {
|
| + TraceInline(target, caller, "target requires context change");
|
| + return false;
|
| + }
|
| +#endif
|
| +
|
| // Don't inline deeper than the maximum number of inlining levels.
|
| HEnvironment* env = environment();
|
| int current_level = 1;
|
| @@ -7135,8 +7146,10 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
|
| function_state()->inlining_kind(),
|
| undefined_receiver);
|
|
|
| +#if !V8_TARGET_ARCH_A64
|
| HConstant* context = Add<HConstant>(Handle<Context>(target->context()));
|
| inner_env->BindContext(context);
|
| +#endif
|
|
|
| Add<HSimulate>(return_id);
|
| current_block()->UpdateEnvironment(inner_env);
|
|
|