diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGAvailability.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGAvailability.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGAvailability.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGAvailability.h b/Source/JavaScriptCore/dfg/DFGAvailability.h index fd9bf6529..6d157f547 100644 --- a/Source/JavaScriptCore/dfg/DFGAvailability.h +++ b/Source/JavaScriptCore/dfg/DFGAvailability.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGAvailability_h -#define DFGAvailability_h +#pragma once #if ENABLE(DFG_JIT) @@ -81,10 +80,26 @@ public: return withNode(unavailableMarker()); } + void setFlush(FlushedAt flushedAt) + { + m_flushedAt = flushedAt; + } + + void setNode(Node* node) + { + m_node = node; + } + + void setNodeUnavailable() + { + m_node = unavailableMarker(); + } + bool nodeIsUndecided() const { return !m_node; } bool nodeIsUnavailable() const { return m_node == unavailableMarker(); } bool hasNode() const { return !nodeIsUndecided() && !nodeIsUnavailable(); } + bool shouldUseNode() const { return !isFlushUseful() && hasNode(); } Node* node() const { @@ -94,6 +109,12 @@ public: } FlushedAt flushedAt() const { return m_flushedAt; } + bool isFlushUseful() const + { + return flushedAt().format() != DeadFlush && flushedAt().format() != ConflictingFlush; + } + + bool isDead() const { return !isFlushUseful() && !hasNode(); } bool operator!() const { return nodeIsUnavailable() && flushedAt().format() == ConflictingFlush; } @@ -103,6 +124,11 @@ public: && m_flushedAt == other.m_flushedAt; } + bool operator!=(const Availability& other) const + { + return !(*this == other); + } + Availability merge(const Availability& other) const { return Availability( @@ -137,6 +163,3 @@ private: } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGAvailability_h - |