summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/compiler/regress-607493.js
blob: 540b47e2d2932a04c0c9cdc2a78346a9a1b63f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --allow-natives-syntax

(function ForInTryCatchContrinueOsr() {
  var a = [1];

  function g() {
    for (var x in a) {
      try {
        for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
        return;
      } catch(e) {
        continue;
      }
    }
  }

  g();
})();

(function ForInContinueNestedOsr() {
  var a = [1];

  function g() {
    for (var x in a) {
      if (x) {
        for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
      }
      continue;
    }
  }

  g();
})();