[DFG][FTL] Make ArraySlice(0) code tight
[WebKit-https.git] / Source / JavaScriptCore / dfg / DFGFixupPhase.cpp
index 142943deec9db4b860b5cee946a8d65f69c8e1dd..0485ca85636c24b4739ab4a2f765b44c0ad2f719 100644 (file)
@@ -1075,9 +1075,11 @@ private:
 
         case ArraySlice: {
             fixEdge<KnownCellUse>(m_graph.varArgChild(node, 0));
-            fixEdge<Int32Use>(m_graph.varArgChild(node, 1));
-            if (node->numChildren() == 4)
-                fixEdge<Int32Use>(m_graph.varArgChild(node, 2));
+            if (node->numChildren() >= 3) {
+                fixEdge<Int32Use>(m_graph.varArgChild(node, 1));
+                if (node->numChildren() == 4)
+                    fixEdge<Int32Use>(m_graph.varArgChild(node, 2));
+            }
             break;
         }