Remove excessive headers from JavaScriptCore
[WebKit-https.git] / Source / JavaScriptCore / runtime / ControlFlowProfiler.h
index e745b2d..4ae1459 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef ControlFlowProfiler_h
-#define ControlFlowProfiler_h
+#pragma once
 
 #include "BasicBlockLocation.h"
 #include <wtf/HashMap.h>
-#include <wtf/HashMethod.h>
 
 namespace JSC {
 
@@ -87,9 +85,11 @@ struct BasicBlockRange {
     int m_startOffset;
     int m_endOffset;
     bool m_hasExecuted;
+    size_t m_executionCount;
 };
 
 class ControlFlowProfiler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     ControlFlowProfiler();
     ~ControlFlowProfiler();
@@ -97,7 +97,8 @@ public:
     JS_EXPORT_PRIVATE void dumpData() const;
     Vector<BasicBlockRange> getBasicBlocksForSourceID(intptr_t sourceID, VM&) const;
     BasicBlockLocation* dummyBasicBlock() { return &m_dummyBasicBlock; }
-    JS_EXPORT_PRIVATE bool hasBasicBlockAtTextOffsetBeenExecuted(int, intptr_t, VM&); // This function exists for testing.
+    JS_EXPORT_PRIVATE bool hasBasicBlockAtTextOffsetBeenExecuted(int, intptr_t, VM&);  // This function exists for testing.
+    JS_EXPORT_PRIVATE size_t basicBlockExecutionCountAtTextOffset(int, intptr_t, VM&); // This function exists for testing.
 
 private:
     typedef HashMap<BasicBlockKey, BasicBlockLocation*> BlockLocationCache;
@@ -108,5 +109,3 @@ private:
 };
 
 } // namespace JSC
-
-#endif // ControlFlowProfiler_h