summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
commita4e969f4965059196ca948db781e52f7cfebf19e (patch)
tree6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/bytecode/DFGExitProfile.cpp
parent41386e9cb918eed93b3f13648cbef387e371e451 (diff)
downloadWebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/bytecode/DFGExitProfile.cpp')
-rw-r--r--Source/JavaScriptCore/bytecode/DFGExitProfile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp b/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp
index 5d05bbb2f..40a25ced6 100644
--- a/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp
+++ b/Source/JavaScriptCore/bytecode/DFGExitProfile.cpp
@@ -28,8 +28,6 @@
#if ENABLE(DFG_JIT)
-#include <wtf/PassOwnPtr.h>
-
namespace JSC { namespace DFG {
ExitProfile::ExitProfile() { }
@@ -37,10 +35,12 @@ ExitProfile::~ExitProfile() { }
bool ExitProfile::add(const ConcurrentJITLocker&, const FrequentExitSite& site)
{
+ ASSERT(site.jitType() != ExitFromAnything);
+
// If we've never seen any frequent exits then create the list and put this site
// into it.
if (!m_frequentExitSites) {
- m_frequentExitSites = adoptPtr(new Vector<FrequentExitSite>());
+ m_frequentExitSites = std::make_unique<Vector<FrequentExitSite>>();
m_frequentExitSites->append(site);
return true;
}
@@ -78,7 +78,7 @@ bool ExitProfile::hasExitSite(const ConcurrentJITLocker&, const FrequentExitSite
return false;
for (unsigned i = m_frequentExitSites->size(); i--;) {
- if (m_frequentExitSites->at(i) == site)
+ if (site.subsumes(m_frequentExitSites->at(i)))
return true;
}
return false;