summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGMinifiedNode.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGMinifiedNode.h43
1 files changed, 18 insertions, 25 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGMinifiedNode.h b/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
index afea6aeed..29f6da3ba 100644
--- a/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
+++ b/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2014, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,10 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DFGMinifiedNode_h
-#define DFGMinifiedNode_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(DFG_JIT)
@@ -42,8 +39,10 @@ inline bool belongsInMinifiedGraph(NodeType type)
{
switch (type) {
case JSConstant:
- case WeakJSConstant:
- case PhantomArguments:
+ case Int52Constant:
+ case DoubleConstant:
+ case PhantomDirectArguments:
+ case PhantomClonedArguments:
return true;
default:
return false;
@@ -59,22 +58,18 @@ public:
MinifiedID id() const { return m_id; }
NodeType op() const { return m_op; }
- bool hasConstant() const { return hasConstantNumber() || hasWeakConstant(); }
-
- bool hasConstantNumber() const { return hasConstantNumber(m_op); }
+ bool hasConstant() const { return hasConstant(m_op); }
- unsigned constantNumber() const
+ JSValue constant() const
{
- ASSERT(hasConstantNumber(m_op));
- return m_info;
+ return JSValue::decode(bitwise_cast<EncodedJSValue>(m_info));
}
- bool hasWeakConstant() const { return hasWeakConstant(m_op); }
+ bool hasInlineCallFrame() const { return hasInlineCallFrame(m_op); }
- JSCell* weakConstant() const
+ InlineCallFrame* inlineCallFrame() const
{
- ASSERT(hasWeakConstant(m_op));
- return bitwise_cast<JSCell*>(m_info);
+ return bitwise_cast<InlineCallFrame*>(static_cast<uintptr_t>(m_info));
}
static MinifiedID getID(MinifiedNode* node) { return node->id(); }
@@ -84,23 +79,21 @@ public:
}
private:
- static bool hasConstantNumber(NodeType type)
+ static bool hasConstant(NodeType type)
{
- return type == JSConstant;
+ return type == JSConstant || type == Int52Constant || type == DoubleConstant;
}
- static bool hasWeakConstant(NodeType type)
+
+ static bool hasInlineCallFrame(NodeType type)
{
- return type == WeakJSConstant;
+ return type == PhantomDirectArguments || type == PhantomClonedArguments;
}
MinifiedID m_id;
- uintptr_t m_info;
+ uint64_t m_info;
NodeType m_op;
};
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
-
-#endif // DFGMinifiedNode_h
-