]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
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; |