Home | History | Annotate | Download | only in regress
      1 // 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 
      7 function inlined(a, i) {
      8   return a[i + 1];
      9 }
     10 
     11 function 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 
     19 foo(0);
     20 foo(0);
     21 %OptimizeFunctionOnNextCall(foo);
     22 foo(0);
     23