Title: [206400] trunk/Source/_javascript_Core
- Revision
- 206400
- Author
- [email protected]
- Date
- 2016-09-26 15:48:18 -0700 (Mon, 26 Sep 2016)
Log Message
Add an Option to disable the CodeCache
https://bugs.webkit.org/show_bug.cgi?id=162579
Patch by Joseph Pecoraro <[email protected]> on 2016-09-26
Reviewed by Geoffrey Garen.
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
Do not use the cache if the Option is disabled.
* runtime/Options.h:
New option to not use the code cache.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (206399 => 206400)
--- trunk/Source/_javascript_Core/ChangeLog 2016-09-26 22:42:19 UTC (rev 206399)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-09-26 22:48:18 UTC (rev 206400)
@@ -1,3 +1,18 @@
+2016-09-26 Joseph Pecoraro <[email protected]>
+
+ Add an Option to disable the CodeCache
+ https://bugs.webkit.org/show_bug.cgi?id=162579
+
+ Reviewed by Geoffrey Garen.
+
+ * runtime/CodeCache.cpp:
+ (JSC::CodeCache::getGlobalCodeBlock):
+ (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
+ Do not use the cache if the Option is disabled.
+
+ * runtime/Options.h:
+ New option to not use the code cache.
+
2016-09-26 Daniel Bates <[email protected]>
Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
Modified: trunk/Source/_javascript_Core/runtime/CodeCache.cpp (206399 => 206400)
--- trunk/Source/_javascript_Core/runtime/CodeCache.cpp 2016-09-26 22:42:19 UTC (rev 206399)
+++ trunk/Source/_javascript_Core/runtime/CodeCache.cpp 2016-09-26 22:48:18 UTC (rev 206400)
@@ -90,7 +90,7 @@
// FIXME: We should do something smart for TDZ instead of just disabling caching.
// https://bugs.webkit.org/show_bug.cgi?id=154010
bool canCache = debuggerMode == DebuggerOff && !vm.typeProfiler() && !vm.controlFlowProfiler() && !variablesUnderTDZ->size();
- if (cache && canCache) {
+ if (cache && canCache && Options::useCodeCache()) {
UnlinkedCodeBlockType* unlinkedCodeBlock = jsCast<UnlinkedCodeBlockType*>(cache->cell.get());
unsigned firstLine = source.firstLine() + unlinkedCodeBlock->firstLine();
unsigned lineCount = unlinkedCodeBlock->lineCount();
@@ -163,7 +163,7 @@
EvalContextType::None,
isArrowFunctionContext);
SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
- if (cache) {
+ if (cache && Options::useCodeCache()) {
UnlinkedFunctionExecutable* executable = jsCast<UnlinkedFunctionExecutable*>(cache->cell.get());
source.provider()->setSourceURLDirective(executable->sourceURLDirective());
source.provider()->setSourceMappingURLDirective(executable->sourceMappingURLDirective());
Modified: trunk/Source/_javascript_Core/runtime/Options.h (206399 => 206400)
--- trunk/Source/_javascript_Core/runtime/Options.h 2016-09-26 22:42:19 UTC (rev 206399)
+++ trunk/Source/_javascript_Core/runtime/Options.h 2016-09-26 22:48:18 UTC (rev 206400)
@@ -388,6 +388,7 @@
v(optionString, llintStatsFile, nullptr, Configurable, "File to collect LLInt statistics in") \
\
v(bool, useSourceProviderCache, true, Normal, "If false, the parser will not use the source provider cache. It's good to verify everything works when this is false. Because the cache is so successful, it can mask bugs.") \
+ v(bool, useCodeCache, true, Normal, "If false, the parser will not use the code cache.") \
enum OptionEquivalence {
SameOption,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes