]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/make-large-string-jit.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / make-large-string-jit.js
CommitLineData
4be4e309
A
1// Like make-large-string.js, but tests MakeRope with two arguments in the DFG and FTL JITs.
2
3var s = "s";
4
5function foo(a, b) {
6 return a + b;
7}
8
9noInline(foo);
10
11for (var i = 0; i < 100000; ++i)
12 foo("a", "b");
13
14try {
15 for (var i = 0; i < 31; ++i)
16 s = foo(s, s);
17 print("Should not have gotten here.");
18 print("String length: " + s.length);
19 throw "Should not have gotten here.";
20} catch (e) {
21 if (e.message != "Out of memory")
22 throw "Wrong error: " + e;
23}