summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/dfg/DFGMinifiedNode.h
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGMinifiedNode.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGMinifiedNode.h63
1 files changed, 17 insertions, 46 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGMinifiedNode.h b/Source/JavaScriptCore/dfg/DFGMinifiedNode.h
index a1702903e..29798bc22 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
@@ -26,8 +26,6 @@
#ifndef DFGMinifiedNode_h
#define DFGMinifiedNode_h
-#include <wtf/Platform.h>
-
#if ENABLE(DFG_JIT)
#include "DFGCommon.h"
@@ -42,13 +40,10 @@ inline bool belongsInMinifiedGraph(NodeType type)
{
switch (type) {
case JSConstant:
- case WeakJSConstant:
- case ValueToInt32:
- case Int32ToDouble:
- case ForwardInt32ToDouble:
- case UInt32ToNumber:
- case DoubleAsInt32:
- case PhantomArguments:
+ case Int52Constant:
+ case DoubleConstant:
+ case PhantomDirectArguments:
+ case PhantomClonedArguments:
return true;
default:
return false;
@@ -64,30 +59,18 @@ public:
MinifiedID id() const { return m_id; }
NodeType op() const { return m_op; }
- bool hasChild1() const { return hasChild(m_op); }
+ bool hasConstant() const { return hasConstant(m_op); }
- MinifiedID child1() const
+ JSValue constant() const
{
- ASSERT(hasChild(m_op));
- return MinifiedID::fromBits(m_childOrInfo);
+ return JSValue::decode(bitwise_cast<EncodedJSValue>(m_info));
}
- bool hasConstant() const { return hasConstantNumber() || hasWeakConstant(); }
-
- bool hasConstantNumber() const { return hasConstantNumber(m_op); }
+ bool hasInlineCallFrame() const { return hasInlineCallFrame(m_op); }
- unsigned constantNumber() const
+ InlineCallFrame* inlineCallFrame() const
{
- ASSERT(hasConstantNumber(m_op));
- return m_childOrInfo;
- }
-
- bool hasWeakConstant() const { return hasWeakConstant(m_op); }
-
- JSCell* weakConstant() const
- {
- ASSERT(hasWeakConstant(m_op));
- return bitwise_cast<JSCell*>(m_childOrInfo);
+ return bitwise_cast<InlineCallFrame*>(static_cast<uintptr_t>(m_info));
}
static MinifiedID getID(MinifiedNode* node) { return node->id(); }
@@ -97,30 +80,18 @@ 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)
+ 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_childOrInfo; // Nodes in the minified graph have only one child each.
+ uint64_t m_info;
NodeType m_op;
};