blob: 540b47e2d2932a04c0c9cdc2a78346a9a1b63f9c [file] [log] [blame]
Ben Murdochc5610432016-08-08 18:44:38 +01001// 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
6
7(function ForInTryCatchContrinueOsr() {
8 var a = [1];
9
10 function g() {
11 for (var x in a) {
12 try {
13 for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
14 return;
15 } catch(e) {
16 continue;
17 }
18 }
19 }
20
21 g();
22})();
23
24(function ForInContinueNestedOsr() {
25 var a = [1];
26
27 function g() {
28 for (var x in a) {
29 if (x) {
30 for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
31 }
32 continue;
33 }
34 }
35
36 g();
37})();