1// Copyright 2014 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 7var g = 0; 8 9function f(x, deopt) { 10 var a0 = x; 11 var a1 = 2 * x; 12 var a2 = 3 * x; 13 var a3 = 4 * x; 14 var a4 = 5 * x; 15 var a5 = 6 * x; 16 var a6 = 7 * x; 17 var a7 = 8 * x; 18 var a8 = 9 * x; 19 var a9 = 10 * x; 20 var a10 = 11 * x; 21 var a11 = 12 * x; 22 var a12 = 13 * x; 23 var a13 = 14 * x; 24 var a14 = 15 * x; 25 var a15 = 16 * x; 26 var a16 = 17 * x; 27 var a17 = 18 * x; 28 var a18 = 19 * x; 29 var a19 = 20 * x; 30 31 g = 1; 32 33 deopt + 0; 34 35 return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + 36 a10 + a11 + a12 + a13 + a14 + a15 + a16 + a17 + a18 + a19; 37} 38 39f(0.5, 0); 40f(0.5, 0); 41%OptimizeFunctionOnNextCall(f); 42print(f(0.5, "")); 43