Title: [174091] trunk/Source/_javascript_Core
Revision
174091
Author
[email protected]
Date
2014-09-29 15:38:15 -0700 (Mon, 29 Sep 2014)

Log Message

DFG HasStructureProperty codegen should use one fewer registers
https://bugs.webkit.org/show_bug.cgi?id=137235

Reviewed by Andreas Kling.
        
This was an obvious source of inefficiency and it was causing us to run out of registers on
x86-32.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (174090 => 174091)


--- trunk/Source/_javascript_Core/ChangeLog	2014-09-29 22:25:51 UTC (rev 174090)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-09-29 22:38:15 UTC (rev 174091)
@@ -1,5 +1,20 @@
 2014-09-29  Filip Pizlo  <[email protected]>
 
+        DFG HasStructureProperty codegen should use one fewer registers
+        https://bugs.webkit.org/show_bug.cgi?id=137235
+
+        Reviewed by Andreas Kling.
+        
+        This was an obvious source of inefficiency and it was causing us to run out of registers on
+        x86-32.
+
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+
+2014-09-29  Filip Pizlo  <[email protected]>
+
         Don't use GPRResult unless you're flushing registers and making a runtime function call
         https://bugs.webkit.org/show_bug.cgi?id=137234
 

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (174090 => 174091)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2014-09-29 22:25:51 UTC (rev 174090)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2014-09-29 22:38:15 UTC (rev 174091)
@@ -4624,20 +4624,18 @@
         JSValueOperand base(this, node->child1());
         SpeculateCellOperand property(this, node->child2());
         SpeculateCellOperand enumerator(this, node->child3());
-        GPRTemporary scratch(this);
         GPRTemporary resultPayload(this);
         GPRTemporary resultTag(this);
 
         GPRReg baseTagGPR = base.tagGPR();
         GPRReg basePayloadGPR = base.payloadGPR();
         GPRReg propertyGPR = property.gpr();
-        GPRReg scratchGPR = scratch.gpr();
         GPRReg resultPayloadGPR = resultPayload.gpr();
         GPRReg resultTagGPR = resultTag.gpr();
 
-        m_jit.load32(MacroAssembler::Address(basePayloadGPR, JSCell::structureIDOffset()), scratchGPR);
+        m_jit.load32(MacroAssembler::Address(basePayloadGPR, JSCell::structureIDOffset()), resultTagGPR);
         MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 
-            scratchGPR, 
+            resultTagGPR,
             MacroAssembler::Address(enumerator.gpr(), JSPropertyNameEnumerator::cachedStructureIDOffset()));
 
         moveTrueTo(resultPayloadGPR);

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (174090 => 174091)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2014-09-29 22:25:51 UTC (rev 174090)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2014-09-29 22:38:15 UTC (rev 174091)
@@ -4691,17 +4691,15 @@
         JSValueOperand base(this, node->child1());
         SpeculateCellOperand property(this, node->child2());
         SpeculateCellOperand enumerator(this, node->child3());
-        GPRTemporary scratch(this);
         GPRTemporary result(this);
 
         GPRReg baseGPR = base.gpr();
         GPRReg propertyGPR = property.gpr();
-        GPRReg scratchGPR = scratch.gpr();
         GPRReg resultGPR = result.gpr();
 
-        m_jit.load32(MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()), scratchGPR);
+        m_jit.load32(MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()), resultGPR);
         MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 
-            scratchGPR, 
+            resultGPR, 
             MacroAssembler::Address(enumerator.gpr(), JSPropertyNameEnumerator::cachedStructureIDOffset()));
 
         moveTrueTo(resultGPR);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to