Changeset 209201 in webkit


Ignore:
Timestamp:
Dec 1, 2016 1:47:34 PM (7 years ago)
Author:
ggaren@apple.com
Message:

Renamed EvalCodeCache => DirectEvalCodeCache
https://bugs.webkit.org/show_bug.cgi?id=165271

Reviewed by Saam Barati.

We only use this cache for DirectEval, not IndirectEval.

(JSC::DirectEvalCodeCache::visitAggregate):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::EvalCodeCache::visitAggregate): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::directEvalCodeCache):
(JSC::CodeBlock::evalCodeCache): Deleted.

  • bytecode/DirectEvalCodeCache.h: Copied from Source/JavaScriptCore/bytecode/EvalCodeCache.h.

(JSC::EvalCodeCache::CacheKey::CacheKey): Deleted.
(JSC::EvalCodeCache::CacheKey::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::isEmptyValue): Deleted.
(JSC::EvalCodeCache::CacheKey::operator==): Deleted.
(JSC::EvalCodeCache::CacheKey::isHashTableDeletedValue): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::equal): Deleted.
(JSC::EvalCodeCache::tryGet): Deleted.
(JSC::EvalCodeCache::set): Deleted.
(JSC::EvalCodeCache::isEmpty): Deleted.
(JSC::EvalCodeCache::clear): Deleted.

  • bytecode/EvalCodeCache.h: Removed.
  • interpreter/Interpreter.cpp:

(JSC::eval):

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

Location:
trunk/Source/JavaScriptCore
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r209196 r209201  
     12016-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
    1362016-12-01  Geoffrey Garen  <ggaren@apple.com>
    237
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r209123 r209201  
    15531553                969A07960ED1D3AE00F1F681 /* CodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */; settings = {COMPILER_FLAGS = "-fno-strict-aliasing"; }; };
    15541554                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, ); }; };
    15561556                969A07990ED1D3AE00F1F681 /* Instruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 969A07930ED1D3AE00F1F681 /* Instruction.h */; settings = {ATTRIBUTES = (Private, ); }; };
    15571557                969A079A0ED1D3AE00F1F681 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07940ED1D3AE00F1F681 /* Opcode.cpp */; };
     
    40164016                969A07900ED1D3AE00F1F681 /* CodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlock.cpp; sourceTree = "<group>"; };
    40174017                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>"; };
    40194019                969A07930ED1D3AE00F1F681 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = "<group>"; };
    40204020                969A07940ED1D3AE00F1F681 /* Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Opcode.cpp; sourceTree = "<group>"; };
     
    72027202                                14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */,
    72037203                                14AD91061DCA92940014F9FE /* EvalCodeBlock.h */,
    7204                                 969A07920ED1D3AE00F1F681 /* EvalCodeCache.h */,
     7204                                969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */,
    72057205                                14142E521B796EDD00F4BF4B /* ExecutableInfo.h */,
    72067206                                0F56A1D415001CF2002992B1 /* ExecutionCounter.cpp */,
     
    81988198                                BC02E90F0E1839DB000F9297 /* ErrorPrototype.h in Headers */,
    81998199                                996B731B1BDA08D100331B84 /* ErrorPrototype.lut.h in Headers */,
    8200                                 969A07980ED1D3AE00F1F681 /* EvalCodeCache.h in Headers */,
     8200                                969A07980ED1D3AE00F1F681 /* DirectEvalCodeCache.h in Headers */,
    82018201                                A54982041891D0B00081E5B8 /* EventLoop.h in Headers */,
    82028202                                FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */,
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r208985 r209201  
    17981798    macro(constantRegisters)
    17991799
    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 
    18111800template<typename T>
    18121801static size_t sizeInBytes(const Vector<T>& vector)
     
    24882477}
    24892478
    2490 void EvalCodeCache::visitAggregate(SlotVisitor& visitor)
     2479void DirectEvalCodeCache::visitAggregate(SlotVisitor& visitor)
    24912480{
    24922481    EvalCacheMap::iterator end = m_cacheMap.end();
     
    31333122    visitor.append(&m_unlinkedCode);
    31343123    if (m_rareData)
    3135         m_rareData->m_evalCodeCache.visitAggregate(visitor);
     3124        m_rareData->m_directEvalCodeCache.visitAggregate(visitor);
    31363125    visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
    31373126    for (size_t i = 0; i < m_functionExprs.size(); ++i)
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r208985 r209201  
    4343#include "DFGExitProfile.h"
    4444#include "DeferredCompilationCallback.h"
    45 #include "EvalCodeCache.h"
     45#include "DirectEvalCodeCache.h"
    4646#include "EvalExecutable.h"
    4747#include "ExecutionCounter.h"
     
    617617    StringJumpTable& stringSwitchJumpTable(int tableIndex) { RELEASE_ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; }
    618618
    619     EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; }
     619    DirectEvalCodeCache& directEvalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_directEvalCodeCache; }
    620620
    621621    enum ShrinkMode {
     
    871871        Vector<StringJumpTable> m_stringSwitchJumpTables;
    872872
    873         EvalCodeCache m_evalCodeCache;
     873        DirectEvalCodeCache m_directEvalCodeCache;
    874874    };
    875875
  • trunk/Source/JavaScriptCore/bytecode/DirectEvalCodeCache.h

    r209200 r209201  
    3838    class SlotVisitor;
    3939
    40     class EvalCodeCache {
     40    class DirectEvalCodeCache {
    4141    public:
    4242        class CacheKey {
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r208712 r209201  
    3838#include "Debugger.h"
    3939#include "DebuggerCallFrame.h"
     40#include "DirectEvalCodeCache.h"
    4041#include "ErrorInstance.h"
    4142#include "EvalCodeBlock.h"
    42 #include "EvalCodeCache.h"
    4343#include "Exception.h"
    4444#include "ExceptionHelpers.h"
     
    132132        evalContextType = EvalContextType::None;
    133133
    134     DirectEvalExecutable* eval = callerCodeBlock->evalCodeCache().tryGet(programSource, callerCallSiteIndex);
     134    DirectEvalExecutable* eval = callerCodeBlock->directEvalCodeCache().tryGet(programSource, callerCallSiteIndex);
    135135    if (!eval) {
    136136        if (!callerCodeBlock->isStrictMode()) {
     
    155155            return jsUndefined();
    156156
    157         callerCodeBlock->evalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval);
     157        callerCodeBlock->directEvalCodeCache().set(callFrame, callerCodeBlock, programSource, callerCallSiteIndex, eval);
    158158    }
    159159
  • trunk/Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp

    r209196 r209201  
    5454    DebuggerMode debuggerMode = globalObject->hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
    5555
    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.
    5757    UnlinkedEvalCodeBlock* unlinkedEvalCode = generateUnlinkedCodeBlock<UnlinkedEvalCodeBlock>(
    5858        vm, executable, executable->source(), strictMode, JSParserScriptMode::Classic, debuggerMode, error, evalContextType, variablesUnderTDZ);
Note: See TracChangeset for help on using the changeset viewer.