[javascriptcore-test262-automation] Changes from https://github.com/webkit/webkit.git at sha 3454cfdb5a on Sat Aug 18 2018 18:11:01 GMT+0000 (Coordinated Universal Time)

This commit is contained in:
test262-automation 2018-08-18 18:13:37 +00:00 committed by Rick Waldron
parent d7d154b3bc
commit 316bc5ebf5
1 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,38 @@
//@ runDefault("--useFTLJIT=0", "--useConcurrentJIT=false")
let num = 150;
function foo(comp, o, b) {
let sum = o.f;
if (b)
OSRExit();
for (let i = 0; i < comp; ++i) {
sum += o.f;
}
return sum;
}
noInline(foo);
let o = {f:25};
let o2 = {f:25, g:44};
o2.f = 45;
o2.f = 45;
o2.f = 45;
o2.f = 45;
let comp = {
valueOf() { return num; }
}
foo(comp, o2, true);
foo(comp, o2, true);
for (let i = 0; i < 500; ++i) {
foo(comp, o2, false);
}
let o3 = {g:24, f:73};
num = 10000000;
let result = foo(comp, o3, false);
if (result !== (num + 1)*73) {
throw new Error("Bad: " + result);
}