]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/ftl-library-inline-gettimezoneoffset.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / ftl-library-inline-gettimezoneoffset.js
CommitLineData
ed1e77d3
A
1function foo(x, d){
2 return x + d.getTimezoneOffset();
3}
4
5noInline(foo);
6
7var d = new Date();
8var expected = foo(0, d);
9var count = 1000000;
10var result = 0;
11for (var i = 0 ; i < count; i++){
12 result += foo(0, d);
13}
14
15if (result != count * expected)
16 throw "Error: bad result: " + result;