]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/llint-cache-replace-then-cache-get-and-fold-then-invalidate.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / llint-cache-replace-then-cache-get-and-fold-then-invalidate.js
CommitLineData
ed1e77d3
A
1var o = {f:42};
2
3function foo(v) {
4 o.f = v;
5}
6
7function bar() {
8 return o.f;
9}
10
11noInline(foo);
12noInline(bar);
13
14foo(42);
15foo(42);
16
17for (var i = 0; i < 100000; ++i) {
18 var result = bar();
19 if (result != 42)
20 throw "Error: bad result: " + result;
21}
22
23foo(53);
24var result = bar();
25if (result != 53)
26 throw "Error: bad result at end: " + result;