[turbofan] Disable inline allocation of closures.

This puts lowering of {JSCreateClosure} operations behind a flag. For
now the benefit of inline allocating such closures is negligible, it
does increase code size, and breaks in combination with inlining based
on {SharedFunctionInfo}.

R=jarin@chromium.org
BUG=v8:2206

Review-Url: https://codereview.chromium.org/2636493002
Cr-Commit-Position: refs/heads/master@{#42331}
This commit is contained in:
mstarzinger 2017-01-13 06:07:02 -08:00 committed by Commit bot
parent aca17974f6
commit 83f19e7d97
3 changed files with 4 additions and 0 deletions

View File

@ -751,6 +751,7 @@ Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
}
Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) {
if (!FLAG_turbo_lower_create_closure) return NoChange();
DCHECK_EQ(IrOpcode::kJSCreateClosure, node->opcode());
CreateClosureParameters const& p = CreateClosureParametersOf(node->op());
Handle<SharedFunctionInfo> shared = p.shared_info();

View File

@ -486,6 +486,8 @@ DEFINE_BOOL(turbo_stress_instruction_scheduling, false,
"randomly schedule instructions to stress dependency tracking")
DEFINE_BOOL(turbo_store_elimination, true,
"enable store-store elimination in TurboFan")
DEFINE_BOOL(turbo_lower_create_closure, false,
"enable inline allocation for closure instantiation")
// Flags to help platform porters
DEFINE_BOOL(minimal, false,

View File

@ -140,6 +140,7 @@ TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedRestArray) {
// JSCreateClosure
TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) {
if (!FLAG_turbo_lower_create_closure) return;
Node* const context = UndefinedConstant();
Node* const effect = graph()->start();
Node* const control = graph()->start();