Title: [237553] trunk
Revision
237553
Author
[email protected]
Date
2018-10-29 08:46:14 -0700 (Mon, 29 Oct 2018)

Log Message

Add support for GetStack FlushedDouble
https://bugs.webkit.org/show_bug.cgi?id=191012
<rdar://problem/45265141>

Reviewed by Saam Barati.

JSTests:

* stress/get-stack-double.js: Added.
(bar):
(noInline):

Source/_javascript_Core:

LowerDFGToB3::compileGetStack assumed that we would not emit GetStack
for doubles, but it turns out it may arise from the PutStack sinking
phase: if we sink a PutStack into a successor block, other predecessors
will emit a GetStack followed by a Upsilon.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetStack):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (237552 => 237553)


--- trunk/JSTests/ChangeLog	2018-10-29 14:53:14 UTC (rev 237552)
+++ trunk/JSTests/ChangeLog	2018-10-29 15:46:14 UTC (rev 237553)
@@ -1,5 +1,17 @@
 2018-10-29  Tadeu Zagallo  <[email protected]>
 
+        Add support for GetStack FlushedDouble
+        https://bugs.webkit.org/show_bug.cgi?id=191012
+        <rdar://problem/45265141>
+
+        Reviewed by Saam Barati.
+
+        * stress/get-stack-double.js: Added.
+        (bar):
+        (noInline):
+
+2018-10-29  Tadeu Zagallo  <[email protected]>
+
         New bytecode format for JSC
         https://bugs.webkit.org/show_bug.cgi?id=187373
         <rdar://problem/44186758>

Added: trunk/JSTests/stress/get-stack-double.js (0 => 237553)


--- trunk/JSTests/stress/get-stack-double.js	                        (rev 0)
+++ trunk/JSTests/stress/get-stack-double.js	2018-10-29 15:46:14 UTC (rev 237553)
@@ -0,0 +1,11 @@
+function bar(n)
+{
+    for (p = 0; p < 30; p++)
+        if (p + 0.1)
+            n -= 0.2
+}
+
+for (var i = 0; i < 100000; ++i)
+    bar(0);
+
+function noInline() { }

Modified: trunk/Source/_javascript_Core/ChangeLog (237552 => 237553)


--- trunk/Source/_javascript_Core/ChangeLog	2018-10-29 14:53:14 UTC (rev 237552)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-10-29 15:46:14 UTC (rev 237553)
@@ -1,5 +1,21 @@
 2018-10-29  Tadeu Zagallo  <[email protected]>
 
+        Add support for GetStack FlushedDouble
+        https://bugs.webkit.org/show_bug.cgi?id=191012
+        <rdar://problem/45265141>
+
+        Reviewed by Saam Barati.
+
+        LowerDFGToB3::compileGetStack assumed that we would not emit GetStack
+        for doubles, but it turns out it may arise from the PutStack sinking
+        phase: if we sink a PutStack into a successor block, other predecessors
+        will emit a GetStack followed by a Upsilon.
+
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileGetStack):
+
+2018-10-29  Tadeu Zagallo  <[email protected]>
+
         New bytecode format for JSC
         https://bugs.webkit.org/show_bug.cgi?id=187373
         <rdar://problem/44186758>

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (237552 => 237553)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2018-10-29 14:53:14 UTC (rev 237552)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2018-10-29 15:46:14 UTC (rev 237553)
@@ -1737,9 +1737,10 @@
         AbstractValue& value = m_state.operand(data->local);
         
         DFG_ASSERT(m_graph, m_node, isConcrete(data->format), data->format);
-        DFG_ASSERT(m_graph, m_node, data->format != FlushedDouble, data->format); // This just happens to not arise for GetStacks, right now. It would be trivial to support.
         
-        if (isInt32Speculation(value.m_type))
+        if (data->format == FlushedDouble)
+            setDouble(m_out.loadDouble(addressFor(data->machineLocal)));
+        else if (isInt32Speculation(value.m_type))
             setInt32(m_out.load32(payloadFor(data->machineLocal)));
         else
             setJSValue(m_out.load64(addressFor(data->machineLocal)));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to