Changeset 209201 in webkit
- Timestamp:
- Dec 1, 2016 1:47:34 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r209196 r209201 1 2016-12-01 Geoffrey Garen <ggaren@apple.com> 2 3 Renamed EvalCodeCache => DirectEvalCodeCache 4 https://bugs.webkit.org/show_bug.cgi?id=165271 5 6 Reviewed by Saam Barati. 7 8 We only use this cache for DirectEval, not IndirectEval. 9 10 * JavaScriptCore.xcodeproj/project.pbxproj: 11 * bytecode/CodeBlock.cpp: 12 (JSC::DirectEvalCodeCache::visitAggregate): 13 (JSC::CodeBlock::stronglyVisitStrongReferences): 14 (JSC::EvalCodeCache::visitAggregate): Deleted. 15 * bytecode/CodeBlock.h: 16 (JSC::CodeBlock::directEvalCodeCache): 17 (JSC::CodeBlock::evalCodeCache): Deleted. 18 * bytecode/DirectEvalCodeCache.h: Copied from Source/JavaScriptCore/bytecode/EvalCodeCache.h. 19 (JSC::EvalCodeCache::CacheKey::CacheKey): Deleted. 20 (JSC::EvalCodeCache::CacheKey::hash): Deleted. 21 (JSC::EvalCodeCache::CacheKey::isEmptyValue): Deleted. 22 (JSC::EvalCodeCache::CacheKey::operator==): Deleted. 23 (JSC::EvalCodeCache::CacheKey::isHashTableDeletedValue): Deleted. 24 (JSC::EvalCodeCache::CacheKey::Hash::hash): Deleted. 25 (JSC::EvalCodeCache::CacheKey::Hash::equal): Deleted. 26 (JSC::EvalCodeCache::tryGet): Deleted. 27 (JSC::EvalCodeCache::set): Deleted. 28 (JSC::EvalCodeCache::isEmpty): Deleted. 29 (JSC::EvalCodeCache::clear): Deleted. 30 * bytecode/EvalCodeCache.h: Removed. 31 * interpreter/Interpreter.cpp: 32 (JSC::eval): 33 * runtime/DirectEvalExecutable.cpp: 34 (JSC::DirectEvalExecutable::create): 35 1 36 2016-12-01 Geoffrey Garen <ggaren@apple.com> 2 37 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r209123 r209201 1553 1553 969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */; settings = {COMPILER_FLAGS = "-fno-strict-aliasing"; }; }; 1554 1554 969A07970ED1D3AE00F1F681 /* CodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07910ED1D3AE00F1F681 /* CodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1555 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /*EvalCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; };1555 969A07980ED1D3AE00F1F681 /* DirectEvalCodeCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1556 1556 969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07930ED1D3AE00F1F681 /* Instruction.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1557 1557 969A079A0ED1D3AE00F1F681 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07940ED1D3AE00F1F681 /* Opcode.cpp */; }; … … 4016 4016 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlock.cpp; sourceTree = "<group>"; }; 4017 4017 969A07910ED1D3AE00F1F681 /* CodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlock.h; sourceTree = "<group>"; }; 4018 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =EvalCodeCache.h; sourceTree = "<group>"; };4018 969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectEvalCodeCache.h; sourceTree = "<group>"; }; 4019 4019 969A07930ED1D3AE00F1F681 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = "<group>"; }; 4020 4020 969A07940ED1D3AE00F1F681 /* Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Opcode.cpp; sourceTree = "<group>"; }; … … 7202 7202 14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */, 7203 7203 14AD91061DCA92940014F9FE /* EvalCodeBlock.h */, 7204 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */,7204 969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */, 7205 7205 14142E521B796EDD00F4BF4B /* ExecutableInfo.h */, 7206 7206 0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */, … … 8198 8198 BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */, 8199 8199 996B731B1BDA08D100331B84 /* ErrorPrototype.lut.h in Headers */, 8200 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */,8200 969A07980ED1D3AE00F1F681 /* DirectEvalCodeCache.h in Headers */, 8201 8201 A54982041891D0B00081E5B8 /* EventLoop.h in Headers */, 8202 8202 FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */, -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r208985 r209201 1798 1798 macro(constantRegisters) 1799 1799 1800 #define FOR_EACH_MEMBER_VECTOR_RARE_DATA(macro) \1801 macro(regexps) \1802 macro(functions) \1803 macro(exceptionHandlers) \1804 macro(switchJumpTables) \1805 macro(stringSwitchJumpTables) \1806 macro(evalCodeCache) \1807 macro(expressionInfo) \1808 macro(lineInfo) \1809 macro(callReturnIndexVector)1810 1811 1800 template<typename T> 1812 1801 static size_t sizeInBytes(const Vector<T>& vector) … … 2488 2477 } 2489 2478 2490 void EvalCodeCache::visitAggregate(SlotVisitor& visitor)2479 void DirectEvalCodeCache::visitAggregate(SlotVisitor& visitor) 2491 2480 { 2492 2481 EvalCacheMap::iterator end = m_cacheMap.end(); … … 3133 3122 visitor.append(&m_unlinkedCode); 3134 3123 if (m_rareData) 3135 m_rareData->m_ evalCodeCache.visitAggregate(visitor);3124 m_rareData->m_directEvalCodeCache.visitAggregate(visitor); 3136 3125 visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size()); 3137 3126 for (size_t i = 0; i < m_functionExprs.size(); ++i) -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r208985 r209201 43 43 #include "DFGExitProfile.h" 44 44 #include "DeferredCompilationCallback.h" 45 #include " EvalCodeCache.h"45 #include "DirectEvalCodeCache.h" 46 46 #include "EvalExecutable.h" 47 47 #include "ExecutionCounter.h" … … 617 617 StringJumpTable& stringSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; } 618 618 619 EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; }619 DirectEvalCodeCache& directEvalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_directEvalCodeCache; } 620 620 621 621 enum ShrinkMode { … … 871 871 Vector<StringJumpTable> m_stringSwitchJumpTables; 872 872 873 EvalCodeCache m_evalCodeCache;873 DirectEvalCodeCache m_directEvalCodeCache; 874 874 }; 875 875 -
trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h
r209200 r209201 38 38 class SlotVisitor; 39 39 40 class EvalCodeCache {40 class DirectEvalCodeCache { 41 41 public: 42 42 class CacheKey { -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r208712 r209201 38 38 #include "Debugger.h" 39 39 #include "DebuggerCallFrame.h" 40 #include "DirectEvalCodeCache.h" 40 41 #include "ErrorInstance.h" 41 42 #include "EvalCodeBlock.h" 42 #include "EvalCodeCache.h"43 43 #include "Exception.h" 44 44 #include "ExceptionHelpers.h" … … 132 132 evalContextType = EvalContextType::None; 133 133 134 DirectEvalExecutable* eval = callerCodeBlock-> evalCodeCache().tryGet(programSource, callerCallSiteIndex);134 DirectEvalExecutable* eval = callerCodeBlock->directEvalCodeCache().tryGet(programSource, callerCallSiteIndex); 135 135 if (!eval) { 136 136 if (!callerCodeBlock->isStrictMode()) { … … 155 155 return jsUndefined(); 156 156 157 callerCodeBlock-> evalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval);157 callerCodeBlock->directEvalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval); 158 158 } 159 159 -
trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp
r209196 r209201 54 54 DebuggerMode debuggerMode = globalObject->hasInteractiveDebugger() ? DebuggerOn : DebuggerOff; 55 55 56 // We don't bother with CodeCache here because direct eval uses a specialized EvalCodeCache.56 // We don't bother with CodeCache here because direct eval uses a specialized DirectEvalCodeCache. 57 57 UnlinkedEvalCodeBlock* unlinkedEvalCode = generateUnlinkedCodeBlock<UnlinkedEvalCodeBlock>( 58 58 vm, executable, executable->source(), strictMode, JSParserScriptMode::Classic, debuggerMode, error, evalContextType, variablesUnderTDZ);
Note: See TracChangeset
for help on using the changeset viewer.