From f676db4655ea8d87e5f6a8172341dbf0cb09923b Mon Sep 17 00:00:00 2001 From: bmeurer Date: Sun, 28 Aug 2016 22:16:05 -0700 Subject: [PATCH] [turbofan] Lazy bailout for calls doesn't need callee. There's no need to preserve the exact callee for lazy bailouts from JSCallFunction in the AstGraphBuilder, as fullcodegen code will never look at that value after the callee returns. So we just push optimized_out instead. BUG=v8:5267 R=jarin@chromium.org Review-Url: https://codereview.chromium.org/2285183002 Cr-Commit-Position: refs/heads/master@{#38963} --- src/compiler/ast-graph-builder.cc | 5 ++++- test/cctest/cctest.status | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc index 4ffc1e4939..2db91d5b72 100644 --- a/src/compiler/ast-graph-builder.cc +++ b/src/compiler/ast-graph-builder.cc @@ -2450,7 +2450,10 @@ void AstGraphBuilder::VisitCall(Call* expr) { args->length() + 2, feedback, receiver_hint, expr->tail_call_mode()); PrepareEagerCheckpoint(possibly_eval ? expr->EvalId() : expr->CallId()); Node* value = ProcessArguments(call, args->length() + 2); - environment()->Push(value->InputAt(0)); // The callee passed to the call. + // The callee passed to the call, we just need to push something here to + // satisfy the bailout location contract. The fullcodegen code will not + // ever look at this value, so we just push optimized_out here. + environment()->Push(jsgraph()->OptimizedOutConstant()); PrepareFrameState(value, expr->ReturnId(), OutputFrameStateCombine::Push()); environment()->Drop(1); ast_context()->ProduceValue(expr, value); diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index 5a88f0f701..6f3057d25f 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -327,11 +327,6 @@ ############################################################################## ['variant == turbofan', { - # TODO(bmeurer): TurboFan embeds strong references to all kinds of objects - # via deoptimization data (Crankshaft also does this, but lack proper test - # coverage). - 'test-heap/ObjectsInOptimizedCodeAreWeak': [FAIL], - # TurboFan cpu profiler result is different. 'test-cpu-profiler/CollectDeoptEvents': [FAIL], 'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [FAIL],