[JSC] AI should not propagate AbstractValue relying on constant folding phase
[WebKit-https.git] / JSTests / stress / big-match.js
1 "use strict";
2
3 var bigString = "x";
4 while (bigString.length < 200000)
5     bigString = bigString + bigString;
6
7 if (bigString.length != 262144)
8     throw "Error: bad string length: " + bigString.length;
9
10 var result = /x/g[Symbol.match](bigString);
11
12 if (result.length != 262144)
13     throw "Error: bad result array length: " + result.length;
14
15 for (var i = 0; i < result.length; ++i) {
16     if (result[i] != "x")
17         throw "Error: array does not contain \"x\" at i = " + i + ": " + result[i];
18 }
19
20