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