Commit abd63018 authored by tebbi's avatar tebbi Committed by Commit bot

[turbofan] fixed escape analysis bug: missing copy of virtual state

R=jarin@chromium.org

BUG=chromium:673243

Review-Url: https://codereview.chromium.org/2578133002
Cr-Commit-Position: refs/heads/master@{#41848}
parent 3bede2f7
......@@ -1083,6 +1083,9 @@ bool EscapeAnalysis::Process(Node* node) {
ProcessAllocationUsers(node);
break;
}
if (OperatorProperties::HasFrameStateInput(node->op())) {
virtual_states_[node->id()]->SetCopyRequired();
}
return true;
}
......@@ -1176,8 +1179,7 @@ void EscapeAnalysis::ForwardVirtualState(Node* node) {
static_cast<void*>(virtual_states_[effect->id()]),
effect->op()->mnemonic(), effect->id(), node->op()->mnemonic(),
node->id());
if (status_analysis_->IsEffectBranchPoint(effect) ||
OperatorProperties::HasFrameStateInput(node->op())) {
if (status_analysis_->IsEffectBranchPoint(effect)) {
virtual_states_[node->id()]->SetCopyRequired();
TRACE(", effect input %s#%d is branch point", effect->op()->mnemonic(),
effect->id());
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo --turbo-escape
function foo() {
var o = {x:0};
for (var i = 0; o.x < 1;) {
o.x++;
i+= 1;
}
function bar() {i};
return o.x;
}
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
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