]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/exit-after-int32-to-double.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / exit-after-int32-to-double.js
1 function foo(x, o) {
2 return o.f + x;
3 }
4
5 noInline(foo);
6
7 for (var i = 0; i < 100000; ++i) {
8 var result = foo(42.5, {f:5});
9 if (result != 47.5)
10 throw "Error: bad result: " + result;
11 }
12
13 var result = foo("42", {f:5});
14 if (result != "542")
15 throw "Error: bad result: " + result;