Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 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: --allow-natives-syntax --use-osr |
| 6 | |
| 7 | var body = |
| 8 | "function bar1( ) {" + |
| 9 | " var i = 35; " + |
| 10 | " while (i-- > 31) {" + |
| 11 | " %OptimizeOsr(); " + |
| 12 | " j = 9; " + |
| 13 | " while (j-- > 7);" + |
| 14 | " } " + |
| 15 | " return i; " + |
| 16 | "}"; |
| 17 | |
| 18 | function gen() { |
| 19 | return eval("(" + body + ")"); |
| 20 | } |
| 21 | |
| 22 | gen()(); |