Bug 1640473: Add testcase r=tcampbell
authorIain Ireland <iireland@mozilla.com>
Wed, 27 May 2020 07:09:03 +0000
changeset 597605 0c8ea1dc2587ccf8ab24bc983946855241783149
parent 597604 0faec7424b01d7446bfda7a6b1cf93a6b31ecf3d
child 597606 457f22865596486f79d5f8bee6cc046569a422c3
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1640473
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1640473: Add testcase r=tcampbell Depends on D76751 Differential Revision: https://phabricator.services.mozilla.com/D76889
js/src/jit-test/tests/regexp/bug1640473.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/regexp/bug1640473.js
@@ -0,0 +1,15 @@
+var s = "";
+var input = "";
+for (var i = 0; i < 500; ++i) {
+    s += "(?<a" + i + ">a)";
+    s += "(?<b" + i + ">b)?";
+    input += "a";
+}
+
+var r = RegExp(s);
+var e = r.exec(input);
+
+for (var i = 0; i < 500; i++) {
+    assertEq(e.groups["a" + i], "a");
+    assertEq(e.groups["b" + i], undefined);
+}