Commit caf460b2 authored by jarin's avatar jarin Committed by Commit bot

[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}
parent 95b8f3b0
...@@ -4,17 +4,34 @@ ...@@ -4,17 +4,34 @@
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
var a = [1]; (function ForInTryCatchContrinueOsr() {
var a = [1];
function g() { function g() {
for (var x in a) { for (var x in a) {
try { try {
for (var i = 0; i < 10; i++) { %OptimizeOsr(); } for (var i = 0; i < 10; i++) { %OptimizeOsr(); }
return; return;
} catch(e) { } 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; continue;
} }
} }
}
g(); g();
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment