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