mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 22:40:28 +02:00
* [javascriptcore-test262-automation] changes from git@github.com:WebKit/webkit.git at sha 949e26452cfa153a7f4afe593da97e2fe9e1b706 on Tue Jul 03 2018 14:35:15 GMT-0400 (Eastern Daylight Time)
42 lines
697 B
JavaScript
42 lines
697 B
JavaScript
function e() { }
|
|
noInline(e);
|
|
|
|
function foo(b, c, d) {
|
|
let x;
|
|
function bar() { return x; }
|
|
if (b) {
|
|
let y = function() { return x; }
|
|
} else {
|
|
let y = function() { return x; }
|
|
}
|
|
|
|
if (c) {
|
|
function baz() { }
|
|
if (b) {
|
|
let y = function() { return x; }
|
|
e(y);
|
|
} else {
|
|
let y = function() { return x; }
|
|
e(y);
|
|
}
|
|
if (d)
|
|
d();
|
|
e(baz);
|
|
}
|
|
|
|
}
|
|
noInline(foo);
|
|
|
|
for (let i = 0; i < 100000; i++) {
|
|
foo(!!(i % 2), true, false);
|
|
}
|
|
|
|
let threw = false;
|
|
try {
|
|
foo(true, true, true);
|
|
} catch(e) {
|
|
threw = true;
|
|
}
|
|
if (!threw)
|
|
throw new Error("Bad test")
|