Commit 89b7a4d7 authored by ofrobots's avatar ofrobots Committed by Commit bot

Revert I+TF for lexical variables

This reverts the following commits to fix a Node.js regression:
* 5529430d "[compiler] Consistently use Ignition+TurboFan for lexical variables."
* 78691367 "[compiler] Improve let+const decision in AstNumbering."

R=adamk@chromium.org, bmeurer@chromium.org, hablich@chromium.org
BUG=
NOTRY=true

Review-Url: https://codereview.chromium.org/2647523002
Cr-Commit-Position: refs/heads/master@{#42484}
parent f3dcdf88
......@@ -166,12 +166,6 @@ void AstNumberingVisitor::VisitVariableProxyReference(VariableProxy* node) {
default:
break;
}
if (node->var()->binding_needs_init()) {
// Disable FCG+CS for all variable bindings that need explicit
// initialization, i.e. ES2015 style const and let, but not
// named function expressions.
DisableFullCodegenAndCrankshaft(kReferenceToLetOrConstVariable);
}
node->set_base_id(ReserveIdRange(VariableProxy::num_ids()));
}
......
......@@ -174,7 +174,6 @@ namespace internal {
V(kReceivedInvalidReturnAddress, "Received invalid return address") \
V(kReferenceToAVariableWhichRequiresDynamicLookup, \
"Reference to a variable which requires dynamic lookup") \
V(kReferenceToLetOrConstVariable, "Reference to let or const variable") \
V(kReferenceToGlobalLexicalVariable, "Reference to global lexical variable") \
V(kReferenceToModuleVariable, "Reference to module-allocated variable") \
V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \
......
// 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
function foo(j) {
for (var i = 0; i < j + 1; i++) {
if (i === j) %OptimizeOsr();
}
let k = 1
}
foo(1000);
foo(1000);
%OptimizeFunctionOnNextCall(foo);
foo(-1);
assertOptimized(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