fpizlo@apple.com | 280ef00 | 2016-04-05 22:13:16 +0000 | [diff] [blame] | 1 | function foo() { |
| 2 | return /(f)(o)(o)/.exec("foo"); |
| 3 | } |
| 4 | |
| 5 | noInline(foo); |
| 6 | |
| 7 | for (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 | } |