Title: [146401] trunk/LayoutTests
Revision
146401
Author
[email protected]
Date
2013-03-20 15:39:23 -0700 (Wed, 20 Mar 2013)

Log Message

"" + 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):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (146400 => 146401)


--- trunk/LayoutTests/ChangeLog	2013-03-20 22:37:09 UTC (rev 146400)
+++ trunk/LayoutTests/ChangeLog	2013-03-20 22:39:23 UTC (rev 146401)
@@ -1,3 +1,15 @@
+2013-03-20  Filip Pizlo  <[email protected]>
+
+        "" + 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  <[email protected]>
 
         Correct coordinated scrolling for RTL iframe and overflow:scroll

Added: trunk/LayoutTests/fast/js/regress/empty-string-plus-int-expected.txt (0 => 146401)


--- trunk/LayoutTests/fast/js/regress/empty-string-plus-int-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/js/regress/empty-string-plus-int-expected.txt	2013-03-20 22:39:23 UTC (rev 146401)
@@ -0,0 +1,10 @@
+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
+

Added: trunk/LayoutTests/fast/js/regress/empty-string-plus-int.html (0 => 146401)


--- trunk/LayoutTests/fast/js/regress/empty-string-plus-int.html	                        (rev 0)
+++ trunk/LayoutTests/fast/js/regress/empty-string-plus-int.html	2013-03-20 22:39:23 UTC (rev 146401)
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/js/regress/script-tests/empty-string-plus-int.js (0 => 146401)


--- trunk/LayoutTests/fast/js/regress/script-tests/empty-string-plus-int.js	                        (rev 0)
+++ trunk/LayoutTests/fast/js/regress/script-tests/empty-string-plus-int.js	2013-03-20 22:39:23 UTC (rev 146401)
@@ -0,0 +1,11 @@
+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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to