]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGAdjacencyList.h
JavaScriptCore-7600.1.4.15.12.tar.gz
[apple/javascriptcore.git] / dfg / DFGAdjacencyList.h
index d3f925d4b1a011a7b0fb9db39a503a52d82f1cfa..38e74dac5bdd01f05a98865e1322022542a74996 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef DFGAdjacencyList_h
 #define DFGAdjacencyList_h
 
-#include <wtf/Platform.h>
-
 #if ENABLE(DFG_JIT)
 
 #include "DFGCommon.h"
@@ -99,6 +97,15 @@ public:
     
     Edge child1Unchecked() const { return m_words[0]; }
     
+    Edge justOneChild() const
+    {
+        if (!!child1() && !child2()) {
+            ASSERT(!child3());
+            return child1();
+        }
+        return Edge();
+    }
+    
     void initialize(Edge child1, Edge child2, Edge child3)
     {
         child(0) = child1;