diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/dfg/DFGMinifiedID.h | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGMinifiedID.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGMinifiedID.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGMinifiedID.h b/Source/JavaScriptCore/dfg/DFGMinifiedID.h index 369659161..bdb312d81 100644 --- a/Source/JavaScriptCore/dfg/DFGMinifiedID.h +++ b/Source/JavaScriptCore/dfg/DFGMinifiedID.h @@ -26,10 +26,6 @@ #ifndef DFGMinifiedID_h #define DFGMinifiedID_h -#include <wtf/Platform.h> - -#if ENABLE(DFG_JIT) - #include "DFGCommon.h" #include <wtf/HashMap.h> #include <wtf/PrintStream.h> @@ -39,6 +35,7 @@ namespace JSC { namespace DFG { class Graph; class MinifiedNode; class ValueSource; +struct Node; class MinifiedID { public: @@ -66,20 +63,21 @@ public: bool isHashTableDeletedValue() const { return m_id == otherInvalidID(); } -private: - friend class MinifiedNode; - friend class ValueSource; - - static uintptr_t invalidID() { return static_cast<uintptr_t>(static_cast<intptr_t>(-1)); } - static uintptr_t otherInvalidID() { return static_cast<uintptr_t>(static_cast<intptr_t>(-2)); } - static MinifiedID fromBits(uintptr_t value) { MinifiedID result; result.m_id = value; return result; } + + uintptr_t bits() const { return m_id; } +private: + friend class MinifiedNode; + + static uintptr_t invalidID() { return static_cast<uintptr_t>(static_cast<intptr_t>(-1)); } + static uintptr_t otherInvalidID() { return static_cast<uintptr_t>(static_cast<intptr_t>(-2)); } + uintptr_t m_id; }; @@ -99,11 +97,11 @@ template<> struct DefaultHash<JSC::DFG::MinifiedID> { }; template<typename T> struct HashTraits; -template<> struct HashTraits<JSC::DFG::MinifiedID> : SimpleClassHashTraits<JSC::DFG::MinifiedID> { }; +template<> struct HashTraits<JSC::DFG::MinifiedID> : SimpleClassHashTraits<JSC::DFG::MinifiedID> { + static const bool emptyValueIsZero = false; +}; } // namespace WTF -#endif // ENABLE(DFG_JIT) - #endif // DFGMinifiedID_h |