OLD | NEW |
---|---|
(Empty) | |
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 | |
7 var sum = 0; | |
8 for (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 | |
16 assertEquals(50095000, sum); | |
OLD | NEW |