blob: 742b71d86e5ed582662f9bfe45796b3e48d157d6 [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: --use-osr --allow-natives-syntax
6
7var sum = 0;
8for (var i = 0; i < 10000; i++) {
9 if (i == 100) %OptimizeOsr();
10 var x = i + 2;
11 var y = x + 5;
12 var z = y + 3;
13 sum += z;
14}
15
16assertEquals(50095000, sum);