| Index: src/compiler/js-inlining.cc
|
| diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
|
| index 6d7de1d30df21621c02dda5590a722d387eb5dff..1251952ab0d1e8ab02b82dbe9025546297c9edb7 100644
|
| --- a/src/compiler/js-inlining.cc
|
| +++ b/src/compiler/js-inlining.cc
|
| @@ -251,6 +251,23 @@ Reduction JSInliner::Reduce(Node* node) {
|
| return NoChange();
|
| }
|
|
|
| + // TODO(turbofan): TranslatedState::GetAdaptedArguments() currently relies on
|
| + // not inlining recursive functions. We might want to relax that at some
|
| + // point.
|
| + for (Node* frame_state = call.frame_state();
|
| + frame_state->opcode() == IrOpcode::kFrameState;
|
| + frame_state = frame_state->InputAt(kFrameStateOuterStateInput)) {
|
| + FrameStateInfo const& info = OpParameter<FrameStateInfo>(frame_state);
|
| + Handle<SharedFunctionInfo> shared_info;
|
| + if (info.shared_info().ToHandle(&shared_info) &&
|
| + *shared_info == function->shared()) {
|
| + TRACE("Not inlining %s into %s because call is recursive\n",
|
| + function->shared()->DebugName()->ToCString().get(),
|
| + info_->shared_info()->DebugName()->ToCString().get());
|
| + return NoChange();
|
| + }
|
| + }
|
| +
|
| Zone zone;
|
| ParseInfo parse_info(&zone, function);
|
| CompilationInfo info(&parse_info);
|
|
|