Title: [132499] trunk/Source/_javascript_Core
Revision
132499
Author
[email protected]
Date
2012-10-25 10:09:42 -0700 (Thu, 25 Oct 2012)

Log Message

DFG NewArrayBuffer node should keep its data in a structure on the side to free up one of the opInfos
https://bugs.webkit.org/show_bug.cgi?id=100328

Reviewed by Oliver Hunt.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGGraph.h:
(Graph):
* dfg/DFGNode.h:
(NewArrayBufferData):
(DFG):
(JSC::DFG::Node::newArrayBufferData):
(Node):
(JSC::DFG::Node::startConstant):
(JSC::DFG::Node::numConstants):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (132498 => 132499)


--- trunk/Source/_javascript_Core/ChangeLog	2012-10-25 16:55:04 UTC (rev 132498)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-10-25 17:09:42 UTC (rev 132499)
@@ -1,3 +1,22 @@
+2012-10-24  Filip Pizlo  <[email protected]>
+
+        DFG NewArrayBuffer node should keep its data in a structure on the side to free up one of the opInfos
+        https://bugs.webkit.org/show_bug.cgi?id=100328
+
+        Reviewed by Oliver Hunt.
+
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        * dfg/DFGGraph.h:
+        (Graph):
+        * dfg/DFGNode.h:
+        (NewArrayBufferData):
+        (DFG):
+        (JSC::DFG::Node::newArrayBufferData):
+        (Node):
+        (JSC::DFG::Node::startConstant):
+        (JSC::DFG::Node::numConstants):
+
 2012-10-25  Mark Lam  <[email protected]>
 
         Update the C++ llint to work with the latest op_resolve... changes.

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (132498 => 132499)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2012-10-25 16:55:04 UTC (rev 132498)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2012-10-25 17:09:42 UTC (rev 132499)
@@ -2150,7 +2150,11 @@
         case op_new_array_buffer: {
             int startConstant = currentInstruction[2].u.operand;
             int numConstants = currentInstruction[3].u.operand;
-            set(currentInstruction[1].u.operand, addToGraph(NewArrayBuffer, OpInfo(m_inlineStackTop->m_constantBufferRemap[startConstant]), OpInfo(numConstants)));
+            NewArrayBufferData data;
+            data.startConstant = m_inlineStackTop->m_constantBufferRemap[startConstant];
+            data.numConstants = numConstants;
+            m_graph.m_newArrayBufferData.append(data);
+            set(currentInstruction[1].u.operand, addToGraph(NewArrayBuffer, OpInfo(&m_graph.m_newArrayBufferData.last())));
             NEXT_OPCODE(op_new_array_buffer);
         }
             

Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (132498 => 132499)


--- trunk/Source/_javascript_Core/dfg/DFGGraph.h	2012-10-25 16:55:04 UTC (rev 132498)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h	2012-10-25 17:09:42 UTC (rev 132499)
@@ -689,6 +689,7 @@
     SegmentedVector<ArgumentPosition, 8> m_argumentPositions;
     SegmentedVector<StructureSet, 16> m_structureSet;
     SegmentedVector<StructureTransitionData, 8> m_structureTransitionData;
+    SegmentedVector<NewArrayBufferData, 4> m_newArrayBufferData;
     bool m_hasArguments;
     HashSet<ExecutableBase*> m_executablesWhoseArgumentsEscaped;
     BitVector m_preservedVars;

Modified: trunk/Source/_javascript_Core/dfg/DFGNode.h (132498 => 132499)


--- trunk/Source/_javascript_Core/dfg/DFGNode.h	2012-10-25 16:55:04 UTC (rev 132498)
+++ trunk/Source/_javascript_Core/dfg/DFGNode.h	2012-10-25 17:09:42 UTC (rev 132499)
@@ -59,6 +59,11 @@
     }
 };
 
+struct NewArrayBufferData {
+    unsigned startConstant;
+    unsigned numConstants;
+};
+
 // This type used in passing an immediate argument to Node constructor;
 // distinguishes an immediate value (typically an index into a CodeBlock data structure - 
 // a constant index, argument, or identifier) from a NodeIndex.
@@ -412,16 +417,20 @@
         return op() == NewArrayBuffer;
     }
     
-    unsigned startConstant()
+    NewArrayBufferData* newArrayBufferData()
     {
         ASSERT(hasConstantBuffer());
-        return m_opInfo;
+        return reinterpret_cast<NewArrayBufferData*>(m_opInfo);
     }
     
+    unsigned startConstant()
+    {
+        return newArrayBufferData()->startConstant;
+    }
+    
     unsigned numConstants()
     {
-        ASSERT(hasConstantBuffer());
-        return m_opInfo2;
+        return newArrayBufferData()->numConstants;
     }
     
     bool hasRegexpIndex()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to