forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1833385 - Call C++ function to flatten ropes in RegExp stubs. r=iain
On Speedometer 3, the most common reason for the stubs failing is rope input strings. We can avoid this by doing a `callWithABI` to a helper function to flatten the rope. Differential Revision: https://phabricator.services.mozilla.com/D178178
- Loading branch information
Showing
2 changed files
with
44 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function test() { | ||
var re = /abc(.+)z/; | ||
for (var i = 0; i < 100; i++) { | ||
assertEq(re.exec(newRope("abcd", "xyz"))[1], "dxy"); | ||
assertEq(re.test(newRope("abcd", "xyz")), true); | ||
assertEq(re[Symbol.search](newRope(".abcd", "xyz")), 1); | ||
assertEq(re[Symbol.match](newRope("abcd", "xyz"))[1], "dxy"); | ||
} | ||
} | ||
test(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters