X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/217a6308cd6a1dc049a0bb69263bd4c91f91c4d0..4be4e30906bcb8ee30b4d189205cb70bad6707ce:/tests/stress/make-large-string-jit.js diff --git a/tests/stress/make-large-string-jit.js b/tests/stress/make-large-string-jit.js new file mode 100644 index 0000000..8ee8847 --- /dev/null +++ b/tests/stress/make-large-string-jit.js @@ -0,0 +1,23 @@ +// Like make-large-string.js, but tests MakeRope with two arguments in the DFG and FTL JITs. + +var s = "s"; + +function foo(a, b) { + return a + b; +} + +noInline(foo); + +for (var i = 0; i < 100000; ++i) + foo("a", "b"); + +try { + for (var i = 0; i < 31; ++i) + s = foo(s, s); + print("Should not have gotten here."); + print("String length: " + s.length); + throw "Should not have gotten here."; +} catch (e) { + if (e.message != "Out of memory") + throw "Wrong error: " + e; +}