blob: c1eafce5efe9b945038ef8fb28e34d067d611f5e [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2015 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: --allow-natives-syntax
6
7function inlined(a, i) {
8 return a[i + 1];
9}
10
11function foo(index) {
12 var a = [0, 1, 2, 3];
13 var result = 0;
14 result += a[index];
15 result += inlined(a, index);
16 return result;
17}
18
19foo(0);
20foo(0);
21%OptimizeFunctionOnNextCall(foo);
22foo(0);