Title: [160514] branches/jsCStack/Source/_javascript_Core
Revision
160514
Author
msab...@apple.com
Date
2013-12-12 16:18:00 -0800 (Thu, 12 Dec 2013)

Log Message

CStack Branch: Eliminate unnecessary add/sub 16 to stack pointer
https://bugs.webkit.org/show_bug.cgi?id=125653

Reviewed by Geoffrey Garen.

Changes as a result of review.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::frameRegisterCount): Changed c-style cast to static_cast.
    Changed rounding for stack alignment to use WTF::roundUpToMultipleOf
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions): Added assertion for JSStack::CallerFrameAndPCSize

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (160513 => 160514)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-13 00:10:19 UTC (rev 160513)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-13 00:18:00 UTC (rev 160514)
@@ -3,8 +3,23 @@
         CStack Branch: Eliminate unnecessary add/sub 16 to stack pointer
         https://bugs.webkit.org/show_bug.cgi?id=125653
 
-        Not yet reviewed.
+        Reviewed by Geoffrey Garen.
 
+        Changes as a result of review.
+
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::frameRegisterCount): Changed c-style cast to static_cast.
+            Changed rounding for stack alignment to use WTF::roundUpToMultipleOf
+        * llint/LLIntData.cpp:
+        (JSC::LLInt::Data::performAssertions): Added assertion for JSStack::CallerFrameAndPCSize
+
+2013-12-12  Michael Saboff  <msab...@apple.com>
+
+        CStack Branch: Eliminate unnecessary add/sub 16 to stack pointer
+        https://bugs.webkit.org/show_bug.cgi?id=125653
+
+        Reviewed by Geoffrey Garen.
+
         Changed the DFG stack frame to include outgoing space for at least the two
         pointers for returnPC and callerFrame.  Changed the setting of the stack
         pointer to not include the space for the outgoing returnPC and callerFrame.

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp (160513 => 160514)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp	2013-12-13 00:10:19 UTC (rev 160513)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp	2013-12-13 00:18:00 UTC (rev 160514)
@@ -703,8 +703,8 @@
 
 unsigned Graph::frameRegisterCount()
 {
-    unsigned result = m_nextMachineLocal + std::max(m_parameterSlots, (unsigned)JSStack::CallerFrameAndPCSize);
-    result += result & 1; // Align the register count
+    unsigned result = m_nextMachineLocal + std::max(m_parameterSlots, static_cast<unsigned>(JSStack::CallerFrameAndPCSize));
+    result = WTF::roundUpToMultipleOf<2>(result);
     return result;
 }
 

Modified: branches/jsCStack/Source/_javascript_Core/llint/LLIntData.cpp (160513 => 160514)


--- branches/jsCStack/Source/_javascript_Core/llint/LLIntData.cpp	2013-12-13 00:10:19 UTC (rev 160513)
+++ branches/jsCStack/Source/_javascript_Core/llint/LLIntData.cpp	2013-12-13 00:18:00 UTC (rev 160514)
@@ -87,6 +87,7 @@
     ASSERT(JSStack::CallFrameHeaderSize == CallFrameHeaderSlots);
 
     ASSERT(!CallFrame::callerFrameOffset());
+    ASSERT(JSStack::CallerFrameAndPCSize == 2);
     ASSERT(CallFrame::returnPCOffset() == CallFrame::callerFrameOffset() + PtrSize);
     ASSERT(JSStack::CodeBlock * sizeof(Register) == CallFrame::returnPCOffset() + PtrSize);
     ASSERT(JSStack::ScopeChain * sizeof(Register) == JSStack::CodeBlock * sizeof(Register) + SlotSize);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to