mirror of
https://github.com/tc39/test262.git
synced 2025-05-05 07:20:27 +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)
32 lines
462 B
JavaScript
32 lines
462 B
JavaScript
function dontCSE() { }
|
|
noInline(dontCSE);
|
|
|
|
function assert(b) {
|
|
if (!b)
|
|
throw new Error("Bad assertion");
|
|
}
|
|
noInline(assert);
|
|
|
|
function foo(a1) {
|
|
let o1 = {x: 20, y: 50};
|
|
let o2 = {y: 40, o1: o1};
|
|
let o3 = {};
|
|
|
|
o3.field = o1.y;
|
|
|
|
dontCSE();
|
|
|
|
if (a1) {
|
|
a1 = true;
|
|
} else {
|
|
a1 = false;
|
|
}
|
|
|
|
let value = o3.field;
|
|
assert(value === 50);
|
|
}
|
|
noInline(foo);
|
|
|
|
for (let i = 0; i < 100000; i++)
|
|
foo(i);
|