summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/dfg/DFGClobberSet.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGClobberSet.h')
-rw-r--r--Source/JavaScriptCore/dfg/DFGClobberSet.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGClobberSet.h b/Source/JavaScriptCore/dfg/DFGClobberSet.h
index 18514f61b..f93e27fdb 100644
--- a/Source/JavaScriptCore/dfg/DFGClobberSet.h
+++ b/Source/JavaScriptCore/dfg/DFGClobberSet.h
@@ -23,10 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DFGClobberSet_h
-#define DFGClobberSet_h
-
-#include <wtf/Platform.h>
+#pragma once
#if ENABLE(DFG_JIT)
@@ -55,11 +52,11 @@ public:
void add(AbstractHeap);
void addAll(const ClobberSet&);
- bool contains(AbstractHeap) const;
bool overlaps(AbstractHeap) const;
void clear();
// Calls useful for debugging the ClobberSet.
+ // Do not call for non debugging purpose. Otherwise, you must handle DOMState hierarchy carefully.
HashSet<AbstractHeap> direct() const;
HashSet<AbstractHeap> super() const;
@@ -67,6 +64,8 @@ public:
void dump(PrintStream&) const;
private:
+ bool contains(AbstractHeap) const;
+
HashSet<AbstractHeap> setOf(bool direct) const;
// Maps heap to:
@@ -82,7 +81,7 @@ public:
{
}
- void operator()(AbstractHeap heap)
+ void operator()(AbstractHeap heap) const
{
m_set.add(heap);
}
@@ -98,7 +97,7 @@ public:
{
}
- void operator()(AbstractHeap heap)
+ void operator()(AbstractHeap heap) const
{
m_result |= m_set.overlaps(heap);
}
@@ -107,7 +106,7 @@ public:
private:
const ClobberSet& m_set;
- bool m_result;
+ mutable bool m_result;
};
void addReads(Graph&, Node*, ClobberSet&);
@@ -120,6 +119,3 @@ bool writesOverlap(Graph&, Node*, ClobberSet&);
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
-
-#endif // DFGClobberSet_h
-