]>
Commit | Line | Data |
---|---|---|
1 | function foo(a, b, c) { | |
2 | c.f.f = a.f + b.f; | |
3 | } | |
4 | ||
5 | noInline(foo); | |
6 | ||
7 | var counter = 0; | |
8 | function makeWeirdObject() { | |
9 | var result = {}; | |
10 | result["blah" + (counter++)] = 42; | |
11 | return result; | |
12 | } | |
13 | ||
14 | for (var i = 0; i < 100000; ++i) { | |
15 | var o = makeWeirdObject(); | |
16 | foo({f:2000000000}, {f:2000000000}, {f:o}); | |
17 | if (o.f != 4000000000) | |
18 | throw "Error: bad result: " + result; | |
19 | } | |
20 | ||
21 | var thingy; | |
22 | Number.prototype.__defineSetter__("f", function(value) { thingy = value; }); | |
23 | foo({f:2000000000}, {f:2000000000}, {f:42}); | |
24 | if (thingy != 4000000000) | |
25 | throw "Error: bad result: " + thingy; |