Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (185102 => 185103)
--- trunk/Source/_javascript_Core/ChangeLog 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-06-02 05:39:11 UTC (rev 185103)
@@ -1,3 +1,30 @@
+2015-05-30 Filip Pizlo <[email protected]>
+
+ Any exit from any JIT due to profiling for an inline cache should force all future compilations to be wary
+ https://bugs.webkit.org/show_bug.cgi?id=145496
+
+ Reviewed by Geoffrey Garen.
+
+ This pessimizes compilation a bit, but it reduces the likelihood of exiting from FTL. I
+ couldn't find any convincing reason not to do this, and we know from Speedometer that this
+ change is necessary for weirder code.
+
+ * bytecode/CallLinkStatus.cpp:
+ (JSC::CallLinkStatus::computeFor):
+ (JSC::CallLinkStatus::computeExitSiteData):
+ (JSC::CallLinkStatus::computeDFGStatuses):
+ * bytecode/CallLinkStatus.h:
+ * bytecode/GetByIdStatus.cpp:
+ (JSC::GetByIdStatus::appendVariant):
+ (JSC::GetByIdStatus::hasExitSite):
+ (JSC::GetByIdStatus::computeFor):
+ * bytecode/GetByIdStatus.h:
+ * bytecode/PutByIdStatus.cpp:
+ (JSC::PutByIdStatus::appendVariant):
+ (JSC::PutByIdStatus::hasExitSite):
+ (JSC::PutByIdStatus::computeFor):
+ * bytecode/PutByIdStatus.h:
+
2015-05-31 Filip Pizlo <[email protected]>
If a call has ever taken the virtual slow path, make sure that the DFG knows this
Modified: trunk/Source/_javascript_Core/bytecode/CallLinkStatus.cpp (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/CallLinkStatus.cpp 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/CallLinkStatus.cpp 2015-06-02 05:39:11 UTC (rev 185103)
@@ -101,17 +101,16 @@
}
CallLinkStatus::ExitSiteData CallLinkStatus::computeExitSiteData(
- const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex,
- ExitingJITType exitingJITType)
+ const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
{
ExitSiteData exitSiteData;
#if ENABLE(DFG_JIT)
exitSiteData.m_takesSlowPath =
- profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadType, exitingJITType))
- || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadExecutable, exitingJITType));
+ profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadType))
+ || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadExecutable));
exitSiteData.m_badFunction =
- profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCell, exitingJITType));
+ profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCell));
#else
UNUSED_PARAM(locker);
UNUSED_PARAM(profiledBlock);
@@ -265,7 +264,7 @@
{
ConcurrentJITLocker locker(currentBaseline->m_lock);
exitSiteData = computeExitSiteData(
- locker, currentBaseline, codeOrigin.bytecodeIndex, ExitFromFTL);
+ locker, currentBaseline, codeOrigin.bytecodeIndex);
}
{
Modified: trunk/Source/_javascript_Core/bytecode/CallLinkStatus.h (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/CallLinkStatus.h 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/CallLinkStatus.h 2015-06-02 05:39:11 UTC (rev 185103)
@@ -81,7 +81,7 @@
bool m_takesSlowPath;
bool m_badFunction;
};
- static ExitSiteData computeExitSiteData(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex, ExitingJITType = ExitFromAnything);
+ static ExitSiteData computeExitSiteData(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
#if ENABLE(JIT)
// Computes the status assuming that we never took slow path and never previously
Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp 2015-06-02 05:39:11 UTC (rev 185103)
@@ -59,10 +59,10 @@
}
#if ENABLE(DFG_JIT)
-bool GetByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex, ExitingJITType jitType)
+bool GetByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
{
- return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache, jitType))
- || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache, jitType));
+ return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
+ || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache));
}
#endif
@@ -232,7 +232,7 @@
{
ConcurrentJITLocker locker(profiledBlock->m_lock);
exitSiteData = CallLinkStatus::computeExitSiteData(
- locker, profiledBlock, codeOrigin.bytecodeIndex, ExitFromFTL);
+ locker, profiledBlock, codeOrigin.bytecodeIndex);
}
GetByIdStatus result;
@@ -247,7 +247,7 @@
{
ConcurrentJITLocker locker(profiledBlock->m_lock);
- if (hasExitSite(locker, profiledBlock, codeOrigin.bytecodeIndex, ExitFromFTL))
+ if (hasExitSite(locker, profiledBlock, codeOrigin.bytecodeIndex))
return GetByIdStatus(TakesSlowPath, true);
}
Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h 2015-06-02 05:39:11 UTC (rev 185103)
@@ -92,7 +92,7 @@
private:
#if ENABLE(DFG_JIT)
- static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex, ExitingJITType = ExitFromAnything);
+ static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
#endif
#if ENABLE(JIT)
static GetByIdStatus computeForStubInfo(
Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp 2015-06-02 05:39:11 UTC (rev 185103)
@@ -54,10 +54,10 @@
}
#if ENABLE(DFG_JIT)
-bool PutByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex, ExitingJITType exitType)
+bool PutByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex)
{
- return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache, exitType))
- || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache, exitType));
+ return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache))
+ || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache));
}
#endif
@@ -281,10 +281,10 @@
CallLinkStatus::ExitSiteData exitSiteData;
{
ConcurrentJITLocker locker(baselineBlock->m_lock);
- if (hasExitSite(locker, baselineBlock, codeOrigin.bytecodeIndex, ExitFromFTL))
+ if (hasExitSite(locker, baselineBlock, codeOrigin.bytecodeIndex))
return PutByIdStatus(TakesSlowPath);
exitSiteData = CallLinkStatus::computeExitSiteData(
- locker, baselineBlock, codeOrigin.bytecodeIndex, ExitFromFTL);
+ locker, baselineBlock, codeOrigin.bytecodeIndex);
}
PutByIdStatus result;
Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h (185102 => 185103)
--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h 2015-06-02 03:29:39 UTC (rev 185102)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h 2015-06-02 05:39:11 UTC (rev 185103)
@@ -92,7 +92,7 @@
private:
#if ENABLE(DFG_JIT)
- static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex, ExitingJITType = ExitFromAnything);
+ static bool hasExitSite(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex);
#endif
#if ENABLE(JIT)
static PutByIdStatus computeForStubInfo(