Commit 20df102b authored by Michael Starzinger's avatar Michael Starzinger

Make TurboFan inlining work without deoptimization.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/726823002

Cr-Commit-Position: refs/heads/master@{#25354}
parent 3bcea483
......@@ -876,7 +876,6 @@ MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
info.MarkAsContextSpecializing();
info.MarkAsTypingEnabled();
info.MarkAsInliningDisabled();
if (GetOptimizedCodeNow(&info)) {
DCHECK(function->shared()->is_compiled());
......
......@@ -200,8 +200,6 @@ class CompilationInfo {
void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); }
void MarkAsInliningDisabled() { SetFlag(kInliningEnabled, false); }
bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); }
void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); }
......
......@@ -405,19 +405,21 @@ void JSInliner::TryInlineJSCall(Node* call_node) {
Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end()));
Node* outer_frame_state = call.frame_state();
// Insert argument adaptor frame if required.
if (call.formal_arguments() != inlinee.formal_parameters()) {
outer_frame_state =
CreateArgumentsAdaptorFrameState(&call, function, info.zone());
}
if (FLAG_turbo_deoptimization) {
Node* outer_frame_state = call.frame_state();
// Insert argument adaptor frame if required.
if (call.formal_arguments() != inlinee.formal_parameters()) {
outer_frame_state =
CreateArgumentsAdaptorFrameState(&call, function, info.zone());
}
for (NodeVectorConstIter it = visitor.copies().begin();
it != visitor.copies().end(); ++it) {
Node* node = *it;
if (node != NULL && node->opcode() == IrOpcode::kFrameState) {
AddClosureToFrameState(node, function);
NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
for (NodeVectorConstIter it = visitor.copies().begin();
it != visitor.copies().end(); ++it) {
Node* node = *it;
if (node != NULL && node->opcode() == IrOpcode::kFrameState) {
AddClosureToFrameState(node, function);
NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment