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: --deopt-every-n-times=1 --no-enable_sse4_1
6
7function g(f, x, name) {
8  var v2 = f(x);
9  for (var i = 0; i < 13000; i++) {
10    f(i);
11  }
12  var v1 = f(x);
13  assertEquals(v1, v2);
14}
15
16g(Math.sin, 6.283185307179586, "Math.sin");
17