#ifndef DFGMinifiedNode_h
#define DFGMinifiedNode_h
-#include <wtf/Platform.h>
-
#if ENABLE(DFG_JIT)
#include "DFGCommon.h"
{
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:
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); }
unsigned constantNumber() const
{
ASSERT(hasConstantNumber(m_op));
- return m_childOrInfo;
+ return m_info;
}
bool hasWeakConstant() const { return hasWeakConstant(m_op); }
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(); }
}
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)
{
}
MinifiedID m_id;
- uintptr_t m_childOrInfo; // Nodes in the minified graph have only one child each.
+ uintptr_t m_info;
NodeType m_op;
};