Title: [143562] trunk/Source/_javascript_Core
Revision
143562
Author
[email protected]
Date
2013-02-20 20:58:08 -0800 (Wed, 20 Feb 2013)

Log Message

DFG::SpeculativeJIT::compileInt32ToDouble() has an unnecessary case for constant operands
https://bugs.webkit.org/show_bug.cgi?id=110309

Reviewed by Sam Weinig.
        
It used to be necessary, back when we didn't have constant folding. Now we have
constant folding. So we don't need it.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInt32ToDouble):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (143561 => 143562)


--- trunk/Source/_javascript_Core/ChangeLog	2013-02-21 04:38:03 UTC (rev 143561)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-02-21 04:58:08 UTC (rev 143562)
@@ -1,3 +1,16 @@
+2013-02-19  Filip Pizlo  <[email protected]>
+
+        DFG::SpeculativeJIT::compileInt32ToDouble() has an unnecessary case for constant operands
+        https://bugs.webkit.org/show_bug.cgi?id=110309
+
+        Reviewed by Sam Weinig.
+        
+        It used to be necessary, back when we didn't have constant folding. Now we have
+        constant folding. So we don't need it.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileInt32ToDouble):
+
 2013-02-20  Filip Pizlo  <[email protected]>
 
         DFG inlines Resolves that it doesn't know how to handle correctly

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (143561 => 143562)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2013-02-21 04:38:03 UTC (rev 143561)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2013-02-21 04:58:08 UTC (rev 143562)
@@ -2310,20 +2310,7 @@
 
 void SpeculativeJIT::compileInt32ToDouble(Node* node)
 {
-#if USE(JSVALUE64)
-    // On JSVALUE64 we have a way of loading double constants in a more direct manner
-    // than a int->double conversion. On 32_64, unfortunately, we currently don't have
-    // any such mechanism - though we could have it, if we just provisioned some memory
-    // in CodeBlock for the double form of integer constants.
-    if (isInt32Constant(node->child1().node())) {
-        FPRTemporary result(this);
-        GPRTemporary temp(this);
-        m_jit.move(MacroAssembler::Imm64(reinterpretDoubleToInt64(valueOfNumberConstant(node->child1().node()))), temp.gpr());
-        m_jit.move64ToDouble(temp.gpr(), result.fpr());
-        doubleResult(result.fpr(), node);
-        return;
-    }
-#endif
+    ASSERT(!isInt32Constant(node->child1().node())); // This should have been constant folded.
     
     if (isInt32Speculation(m_state.forNode(node->child1()).m_type)) {
         SpeculateIntegerOperand op1(this, node->child1());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to