]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/ftl-library-inlining-exceptions.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / ftl-library-inlining-exceptions.js
CommitLineData
ed1e77d3
A
1function foo(d){
2 return Date.prototype.getTimezoneOffset.call(d);
3}
4
5noInline(foo);
6
7var x;
8var count = 100000;
9for (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
18if (!x)
19 throw "bad result: "+ x;