Revert I+TF for lexical variables
This reverts the following commits to fix a Node.js regression: *5529430dec
"[compiler] Consistently use Ignition+TurboFan for lexical variables." *7869136716
"[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}
This commit is contained in:
parent
f3dcdf8862
commit
89b7a4d7d0
@ -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") \
|
||||
|
@ -1,18 +0,0 @@
|
||||
// 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);
|
Loading…
Reference in New Issue
Block a user