]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/ftl-library-inlining-exceptions.js
0b6516bca0ce7f468fdf5b21f81f201a91abd886
[apple/javascriptcore.git] / tests / stress / ftl-library-inlining-exceptions.js
1 function foo(d){
2 return Date.prototype.getTimezoneOffset.call(d);
3 }
4
5 noInline(foo);
6
7 var x;
8 var count = 100000;
9 for (var i = 0 ; i < count; i++){
10 try {
11 foo(i < count - 1000 ? new Date() : "a");
12 x = false;
13 } catch (e) {
14 x = true;
15 }
16 }
17
18 if (!x)
19 throw "bad result: "+ x;