summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-inlining-printing.js
blob: 9a574ad308a3c3e935ae64adac1ce8e7c36272b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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);