v8/test/mjsunit/compiler/regress-607493.js
jarin caf460b288 [turbofan] Better test for for-in/continue OSR problem.
The problem is actually not related to try-catch, so here is a test
without try-catch.

BUG=chromium:607493
LOG=n

Review-Url: https://codereview.chromium.org/1943883002
Cr-Commit-Position: refs/heads/master@{#35985}
2016-05-03 14:05:27 +00:00

38 lines
666 B
JavaScript

// 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();
})();