]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - dfg/DFGMinifiedNode.h
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / dfg / DFGMinifiedNode.h
index a1702903e586c21a46845dca92c62d6d6a5128b0..0cc35ef88aef738ed295dc33d85384b6b1c79f51 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef DFGMinifiedNode_h
 #define DFGMinifiedNode_h
 
-#include <wtf/Platform.h>
-
 #if ENABLE(DFG_JIT)
 
 #include "DFGCommon.h"
@@ -42,12 +40,9 @@ inline bool belongsInMinifiedGraph(NodeType type)
 {
     switch (type) {
     case JSConstant:
+    case Int52Constant:
+    case DoubleConstant:
     case WeakJSConstant:
-    case ValueToInt32:
-    case Int32ToDouble:
-    case ForwardInt32ToDouble:
-    case UInt32ToNumber:
-    case DoubleAsInt32:
     case PhantomArguments:
         return true;
     default:
@@ -64,14 +59,6 @@ public:
     MinifiedID id() const { return m_id; }
     NodeType op() const { return m_op; }
     
-    bool hasChild1() const { return hasChild(m_op); }
-    
-    MinifiedID child1() const
-    {
-        ASSERT(hasChild(m_op));
-        return MinifiedID::fromBits(m_childOrInfo);
-    }
-    
     bool hasConstant() const { return hasConstantNumber() || hasWeakConstant(); }
     
     bool hasConstantNumber() const { return hasConstantNumber(m_op); }
@@ -79,7 +66,7 @@ public:
     unsigned constantNumber() const
     {
         ASSERT(hasConstantNumber(m_op));
-        return m_childOrInfo;
+        return m_info;
     }
     
     bool hasWeakConstant() const { return hasWeakConstant(m_op); }
@@ -87,7 +74,7 @@ public:
     JSCell* weakConstant() const
     {
         ASSERT(hasWeakConstant(m_op));
-        return bitwise_cast<JSCell*>(m_childOrInfo);
+        return bitwise_cast<JSCell*>(m_info);
     }
     
     static MinifiedID getID(MinifiedNode* node) { return node->id(); }
@@ -97,22 +84,9 @@ public:
     }
     
 private:
-    static bool hasChild(NodeType type)
-    {
-        switch (type) {
-        case ValueToInt32:
-        case Int32ToDouble:
-        case ForwardInt32ToDouble:
-        case UInt32ToNumber:
-        case DoubleAsInt32:
-            return true;
-        default:
-            return false;
-        }
-    }
     static bool hasConstantNumber(NodeType type)
     {
-        return type == JSConstant;
+        return type == JSConstant || type == Int52Constant || type == DoubleConstant;
     }
     static bool hasWeakConstant(NodeType type)
     {
@@ -120,7 +94,7 @@ private:
     }
     
     MinifiedID m_id;
-    uintptr_t m_childOrInfo; // Nodes in the minified graph have only one child each.
+    uintptr_t m_info;
     NodeType m_op;
 };