summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGVariableEvent.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGVariableEvent.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGVariableEvent.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGVariableEvent.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGVariableEvent.h b/Source/JavaScriptCore/dfg/DFGVariableEvent.h
index 24423ed2d..6196c2df6 100644
--- a/Source/JavaScriptCore/dfg/DFGVariableEvent.h
+++ b/Source/JavaScriptCore/dfg/DFGVariableEvent.h
@@ -23,10 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DFGVariableEvent_h
-#define DFGVariableEvent_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(DFG_JIT)
@@ -49,6 +46,7 @@ enum VariableEventKind {
// that we start to care about this node.
BirthToFill,
BirthToSpill,
+ Birth,
// Events related to how a node is represented.
Fill,
@@ -135,6 +133,14 @@ public:
return event;
}
+ static VariableEvent birth(MinifiedID id)
+ {
+ VariableEvent event;
+ event.m_which.id = id.bits();
+ event.m_kind = Birth;
+ return event;
+ }
+
static VariableEvent spill(VariableEventKind kind, MinifiedID id, VirtualRegister virtualRegister, DataFormat format)
{
ASSERT(kind == BirthToSpill || kind == Spill);
@@ -181,17 +187,17 @@ public:
MinifiedID id() const
{
- ASSERT(m_kind == BirthToFill || m_kind == Fill
- || m_kind == BirthToSpill || m_kind == Spill
- || m_kind == Death || m_kind == MovHintEvent);
+ ASSERT(
+ m_kind == BirthToFill || m_kind == Fill || m_kind == BirthToSpill || m_kind == Spill
+ || m_kind == Death || m_kind == MovHintEvent || m_kind == Birth);
return MinifiedID::fromBits(m_which.id);
}
DataFormat dataFormat() const
{
- ASSERT(m_kind == BirthToFill || m_kind == Fill
- || m_kind == BirthToSpill || m_kind == Spill
- || m_kind == SetLocalEvent);
+ ASSERT(
+ m_kind == BirthToFill || m_kind == Fill || m_kind == BirthToSpill || m_kind == Spill
+ || m_kind == SetLocalEvent);
return static_cast<DataFormat>(m_dataFormat);
}
@@ -276,6 +282,3 @@ private:
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
-
-#endif // DFGVariableEvent_h
-