Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [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 |
| 6 | |
| 7 | function counter() { return {x: 0} || this } |
| 8 | |
| 9 | var f = (function() { |
| 10 | "use asm"; |
| 11 | return function g(c1, c2) { |
| 12 | for (var x = 0 ; x < 10; ++x) { |
| 13 | if (x == 5) %OptimizeOsr(); |
| 14 | c1(); |
| 15 | } |
| 16 | } |
| 17 | })(); |
| 18 | |
| 19 | g = (function() { f((Array), counter()); }); |
| 20 | g(); |