OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 --turbo --turbo-escape | |
6 | |
7 function foo() { | |
8 var o = {x:0}; | |
9 for (var i = 0; o.x < 1;) { | |
10 o.x++; | |
11 i+= 1; | |
12 } | |
13 function bar() {i}; | |
14 return o.x; | |
15 } | |
16 foo(); | |
17 foo(); | |
18 %OptimizeFunctionOnNextCall(foo); | |
19 foo(); | |
OLD | NEW |