5a624dc465
When the flag is on and some of the functions don't have bytecode, we should gracefully print "no bytecode" instead of crashing. Bug: chromium:983267 Change-Id: Id4e3385cd871a2dd5bead38c29a41b38319cc8d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731003 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#63031}
25 lines
559 B
JavaScript
25 lines
559 B
JavaScript
// Copyright 2019 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 --trace-turbo-inlining
|
|
// Flags: --max-inlined-bytecode-size-small=0
|
|
|
|
function f() {}
|
|
function g() {}
|
|
function h() {}
|
|
|
|
function test(n) {
|
|
h;
|
|
(n == 0 ? f : (n > 0 ? g : h))();
|
|
}
|
|
|
|
%EnsureFeedbackVectorForFunction(f);
|
|
%EnsureFeedbackVectorForFunction(g);
|
|
|
|
%PrepareFunctionForOptimization(test);
|
|
test(0);
|
|
test(1);
|
|
%OptimizeFunctionOnNextCall(test);
|
|
test(0);
|