blob: 1cb1f9ad92124786ecbbabcb627cf371d7855f7a [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --harmony-tailcalls --allow-natives-syntax
6
7"use strict";
8
9function f(x) {
10 return x;
11}
12
13function g(x) {
14 return false ? 0 : f(x, 1);
15}
16
17function h(x) {
18 var z = g(x, 1);
19 return z + 1;
20}
21
22%SetForceInlineFlag(g);
23%SetForceInlineFlag(f);
24
25h(1);
26h(1);
27%OptimizeFunctionOnNextCall(h);
28h("a");