]> git.saurik.com Git - apple/javascriptcore.git/blame_incremental - tests/stress/simple-polyvariant-put-by-id-inlining-example.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / simple-polyvariant-put-by-id-inlining-example.js
... / ...
CommitLineData
1function foo(o) {
2 bar(o);
3}
4
5function fuzz(o) {
6 bar(o);
7}
8
9function bar(o) {
10 o.f = 42;
11}
12
13noInline(foo);
14noInline(fuzz);
15
16for (var i = 0; i < 100000; ++i) {
17 var o = {};
18 foo(o);
19 if (o.f != 42)
20 throw "Error: bad result: " + o.f;
21 o = {f:23};
22 var result = fuzz(o);
23 if (o.f != 42)
24 throw "Error: bad result: " + o.f;
25}
26