https://bugs.webkit.org/show_bug.cgi?id=154871
Reviewed by Michael Saboff.
Really add this new test.
* js/regress/script-tests/string-replace-empty.js: Added.
* js/regress/string-replace-empty-expected.txt: Added.
* js/regress/string-replace-empty.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197417
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-03-01 Filip Pizlo <fpizlo@apple.com>
+
+ FTL should simplify StringReplace with an empty replacement string
+ https://bugs.webkit.org/show_bug.cgi?id=154871
+
+ Reviewed by Michael Saboff.
+
+ Really add this new test.
+
+ * js/regress/script-tests/string-replace-empty.js: Added.
+ * js/regress/string-replace-empty-expected.txt: Added.
+ * js/regress/string-replace-empty.html: Added.
+
2016-02-29 Filip Pizlo <fpizlo@apple.com>
Turn String.prototype.replace into an intrinsic
--- /dev/null
+(function() {
+ var result;
+ for (var i = 0; i < 400000; ++i) {
+ result = "foo".replace(/f/g, "");
+ }
+ if (result != "oo")
+ throw "Error: bad result: "+ result;
+})();
--- /dev/null
+JSRegress/string-replace-empty
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/string-replace-empty.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>