• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: --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);
17