Title: [114956] trunk
Revision
114956
Author
fpi...@apple.com
Date
2012-04-23 15:36:08 -0700 (Mon, 23 Apr 2012)

Log Message

DFG must keep alive values that it will perform speculations on
https://bugs.webkit.org/show_bug.cgi?id=84638
<rdar://problem/11258183>

Source/_javascript_Core: 

Reviewed by Oliver Hunt.

* dfg/DFGNodeType.h:
(DFG):

LayoutTests: 

Rubber stamped by Oliver Hunt.

* fast/js/dfg-dead-speculation-expected.txt: Added.
* fast/js/dfg-dead-speculation.html: Added.
* fast/js/script-tests/dfg-dead-speculation.js: Added.
(foo):
(.thingy.f.valueOf):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (114955 => 114956)


--- trunk/LayoutTests/ChangeLog	2012-04-23 22:33:10 UTC (rev 114955)
+++ trunk/LayoutTests/ChangeLog	2012-04-23 22:36:08 UTC (rev 114956)
@@ -1,3 +1,17 @@
+2012-04-23  Filip Pizlo  <fpi...@apple.com>
+
+        DFG must keep alive values that it will perform speculations on
+        https://bugs.webkit.org/show_bug.cgi?id=84638
+        <rdar://problem/11258183>
+
+        Rubber stamped by Oliver Hunt.
+
+        * fast/js/dfg-dead-speculation-expected.txt: Added.
+        * fast/js/dfg-dead-speculation.html: Added.
+        * fast/js/script-tests/dfg-dead-speculation.js: Added.
+        (foo):
+        (.thingy.f.valueOf):
+
 2012-04-23  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed, rolling out r109981.

Added: trunk/LayoutTests/fast/js/dfg-dead-speculation-expected.txt (0 => 114956)


--- trunk/LayoutTests/fast/js/dfg-dead-speculation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/js/dfg-dead-speculation-expected.txt	2012-04-23 22:36:08 UTC (rev 114956)
@@ -0,0 +1,409 @@
+Tests that the DFG will still perform speculations on dead things.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 84
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS foo(thingy, i) is 10
+PASS variable is 24
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/js/dfg-dead-speculation.html (0 => 114956)


--- trunk/LayoutTests/fast/js/dfg-dead-speculation.html	                        (rev 0)
+++ trunk/LayoutTests/fast/js/dfg-dead-speculation.html	2012-04-23 22:36:08 UTC (rev 114956)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/js/script-tests/dfg-dead-speculation.js (0 => 114956)


--- trunk/LayoutTests/fast/js/script-tests/dfg-dead-speculation.js	                        (rev 0)
+++ trunk/LayoutTests/fast/js/script-tests/dfg-dead-speculation.js	2012-04-23 22:36:08 UTC (rev 114956)
@@ -0,0 +1,22 @@
+description(
+"Tests that the DFG will still perform speculations on dead things."
+);
+
+function foo(a, b) {
+    var x = a.f - b;
+    return 10;
+}
+
+var thingy = {f:42};
+var variable = 84;
+var expected = 84;
+
+for (var i = 0; i < 200; ++i) {
+    if (i == 150) {
+        thingy = {f:{valueOf:function(){ variable = 24; return 5; }}};
+        expected = 24;
+    }
+    shouldBe("foo(thingy, i)", "10");
+    shouldBe("variable", "" + expected);
+}
+

Modified: trunk/Source/_javascript_Core/ChangeLog (114955 => 114956)


--- trunk/Source/_javascript_Core/ChangeLog	2012-04-23 22:33:10 UTC (rev 114955)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-04-23 22:36:08 UTC (rev 114956)
@@ -1,3 +1,14 @@
+2012-04-23  Filip Pizlo  <fpi...@apple.com>
+
+        DFG must keep alive values that it will perform speculations on
+        https://bugs.webkit.org/show_bug.cgi?id=84638
+        <rdar://problem/11258183>
+
+        Reviewed by Oliver Hunt.
+
+        * dfg/DFGNodeType.h:
+        (DFG):
+
 2012-04-23  Oliver Hunt  <oli...@apple.com>
 
         Fix non-LLInt builds by temporarily removing an over-enthusiastic assertion

Modified: trunk/Source/_javascript_Core/dfg/DFGNodeType.h (114955 => 114956)


--- trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2012-04-23 22:33:10 UTC (rev 114955)
+++ trunk/Source/_javascript_Core/dfg/DFGNodeType.h	2012-04-23 22:36:08 UTC (rev 114956)
@@ -80,16 +80,16 @@
     macro(Int32ToDouble, NodeResultNumber) \
     \
     /* Nodes for arithmetic operations. */\
-    macro(ArithAdd, NodeResultNumber) \
-    macro(ArithSub, NodeResultNumber) \
-    macro(ArithNegate, NodeResultNumber) \
-    macro(ArithMul, NodeResultNumber) \
-    macro(ArithDiv, NodeResultNumber) \
-    macro(ArithMod, NodeResultNumber) \
-    macro(ArithAbs, NodeResultNumber) \
-    macro(ArithMin, NodeResultNumber) \
-    macro(ArithMax, NodeResultNumber) \
-    macro(ArithSqrt, NodeResultNumber) \
+    macro(ArithAdd, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithSub, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithNegate, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithMul, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithDiv, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithMod, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithAbs, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithMin, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithMax, NodeResultNumber | NodeMustGenerate) \
+    macro(ArithSqrt, NodeResultNumber | NodeMustGenerate) \
     \
     /* Add of values may either be arithmetic, or result in string concatenation. */\
     macro(ValueAdd, NodeResultJS | NodeMustGenerate | NodeMightClobber) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to