blob: 903932022775860ff3b8fb6661cbfb3ca6b35d1c [file] [log] [blame]
fpizlo@apple.com280ef002016-04-05 22:13:16 +00001function foo() {
2 return /(f)(o)(o)/.exec("foo");
3}
4
5noInline(foo);
6
7for (var i = 0; i < 10000; ++i) {
8 var result = foo();
9 if (result.length != 4)
10 throw "Error: bad result: " + result;
11 if (result[0] != "foo")
12 throw "Error: bad result: " + result;
13 if (result[1] != "f")
14 throw "Error: bad result: " + result;
15 if (result[2] != "o")
16 throw "Error: bad result: " + result;
17 if (result[3] != "o")
18 throw "Error: bad result: " + result;
19}