https://bugs.webkit.org/show_bug.cgi?id=112845
Reviewed by Mark Hahnenberg.
* fast/js/regress/empty-string-plus-int-expected.txt: Added.
* fast/js/regress/empty-string-plus-int.html: Added.
* fast/js/regress/script-tests/empty-string-plus-int.js: Added.
(foo):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146401
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-03-20 Filip Pizlo <fpizlo@apple.com>
+
+ "" + x where x is not a string should be optimized by the DFG to some manner of ToString conversion
+ https://bugs.webkit.org/show_bug.cgi?id=112845
+
+ Reviewed by Mark Hahnenberg.
+
+ * fast/js/regress/empty-string-plus-int-expected.txt: Added.
+ * fast/js/regress/empty-string-plus-int.html: Added.
+ * fast/js/regress/script-tests/empty-string-plus-int.js: Added.
+ (foo):
+
2013-03-20 Tien-Ren Chen <trchen@chromium.org>
Correct coordinated scrolling for RTL iframe and overflow:scroll
--- /dev/null
+JSRegress/empty-string-plus-int
+
+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/empty-string-plus-int.js"></script>
+<script src="resources/regress-post.js"></script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
--- /dev/null
+function foo(x) {
+ return "" + x;
+}
+
+var result;
+var limit = 100000;
+for (var i = 0; i < limit; ++i)
+ result = foo(i);
+
+if (result != String(limit - 1))
+ throw "Error: bad result: " + result;