From 316bc5ebf5e14211edff0f5e9cf746d360e61711 Mon Sep 17 00:00:00 2001 From: test262-automation <test262-automation@bocoup.com> Date: Sat, 18 Aug 2018 18:13:37 +0000 Subject: [PATCH] [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) --- ...cted-values-must-set-clobbered-to-false.js | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 implementation-contributed/javascriptcore/stress/cfa-expected-values-must-set-clobbered-to-false.js diff --git a/implementation-contributed/javascriptcore/stress/cfa-expected-values-must-set-clobbered-to-false.js b/implementation-contributed/javascriptcore/stress/cfa-expected-values-must-set-clobbered-to-false.js new file mode 100644 index 0000000000..99f282e04a --- /dev/null +++ b/implementation-contributed/javascriptcore/stress/cfa-expected-values-must-set-clobbered-to-false.js @@ -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); +} -- GitLab