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