Changeset 169920 in webkit


Ignore:
Timestamp:
Jun 12, 2014 4:30:51 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Remove some dead / unused code.
<https://webkit.org/b/133828>

Reviewed by Filip Pizlo.

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createBuiltinExecutable):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedFunctionExecutable::create):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::makeFunction):

  • parser/Parser.h:

(JSC::DepthManager::DepthManager): Deleted.
(JSC::DepthManager::~DepthManager): Deleted.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getFunctionExecutableFromGlobalCode):

Location:
trunk/Source/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r169903 r169920  
     12014-06-12  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove some dead / unused code.
     4        <https://webkit.org/b/133828>
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * builtins/BuiltinExecutables.cpp:
     9        (JSC::BuiltinExecutables::createBuiltinExecutable):
     10        * bytecode/UnlinkedCodeBlock.cpp:
     11        (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
     12        * bytecode/UnlinkedCodeBlock.h:
     13        (JSC::UnlinkedFunctionExecutable::create):
     14        * bytecompiler/BytecodeGenerator.h:
     15        (JSC::BytecodeGenerator::makeFunction):
     16        * parser/Parser.h:
     17        (JSC::DepthManager::DepthManager): Deleted.
     18        (JSC::DepthManager::~DepthManager): Deleted.
     19        * runtime/CodeCache.cpp:
     20        (JSC::CodeCache::getFunctionExecutableFromGlobalCode):
     21
    1222014-06-12  Mark Hahnenberg  <mhahnenberg@apple.com>
    223
  • trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.cpp

    r167313 r169920  
    7979    }
    8080    body->overrideName(name);
    81     UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&m_vm, source, body, true, UnlinkedBuiltinFunction);
     81    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&m_vm, source, body, UnlinkedBuiltinFunction);
    8282    functionExecutable->m_nameValue.set(m_vm, functionExecutable, jsString(&m_vm, name.string()));
    8383    return functionExecutable;
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r168107 r169920  
    8383}
    8484
    85 UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind kind)
     85UnlinkedFunctionExecutable::UnlinkedFunctionExecutable(VM* vm, Structure* structure, const SourceCode& source, FunctionBodyNode* node, UnlinkedFunctionKind kind)
    8686    : Base(*vm, structure)
    8787    , m_numCapturedVariables(node->capturedVariableCount())
     
    8989    , m_isInStrictContext(node->isStrictMode())
    9090    , m_hasCapturedVariables(node->hasCapturedVariables())
    91     , m_isFromGlobalCode(isFromGlobalCode)
    9291    , m_isBuiltinFunction(kind == UnlinkedBuiltinFunction)
    9392    , m_name(node->ident())
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h

    r168107 r169920  
    9393    friend class VM;
    9494    typedef JSCell Base;
    95     static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionBodyNode* node, bool isFromGlobalCode, UnlinkedFunctionKind unlinkedFunctionKind)
    96     {
    97         UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap)) UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, node, isFromGlobalCode, unlinkedFunctionKind);
     95    static UnlinkedFunctionExecutable* create(VM* vm, const SourceCode& source, FunctionBodyNode* node, UnlinkedFunctionKind unlinkedFunctionKind)
     96    {
     97        UnlinkedFunctionExecutable* instance = new (NotNull, allocateCell<UnlinkedFunctionExecutable>(vm->heap)) UnlinkedFunctionExecutable(vm, vm->unlinkedFunctionExecutableStructure.get(), source, node, unlinkedFunctionKind);
    9898        instance->finishCreation(*vm);
    9999        return instance;
     
    163163
    164164private:
    165     UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, FunctionBodyNode*, bool isFromGlobalCode, UnlinkedFunctionKind);
     165    UnlinkedFunctionExecutable(VM*, Structure*, const SourceCode&, FunctionBodyNode*, UnlinkedFunctionKind);
    166166    WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForCall;
    167167    WriteBarrier<UnlinkedFunctionCodeBlock> m_codeBlockForConstruct;
     
    171171    bool m_isInStrictContext : 1;
    172172    bool m_hasCapturedVariables : 1;
    173     bool m_isFromGlobalCode : 1;
    174173    bool m_isBuiltinFunction : 1;
    175174
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r166392 r169920  
    548548        UnlinkedFunctionExecutable* makeFunction(FunctionBodyNode* body)
    549549        {
    550             return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), body, false, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction);
     550            return UnlinkedFunctionExecutable::create(m_vm, m_scopeNode->source(), body, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction);
    551551        }
    552552
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r168107 r169920  
    8888template <typename T> inline bool isEvalNode() { return false; }
    8989template <> inline bool isEvalNode<EvalNode>() { return true; }
    90 
    91 struct DepthManager {
    92     DepthManager(int* depth)
    93         : m_originalDepth(*depth)
    94         , m_depth(depth)
    95     {
    96     }
    97 
    98     ~DepthManager()
    99     {
    100         *m_depth = m_originalDepth;
    101     }
    102 
    103 private:
    104     int m_originalDepth;
    105     int* m_depth;
    106 };
    10790
    10891struct ScopeLabelInfo {
  • trunk/Source/JavaScriptCore/runtime/CodeCache.cpp

    r167313 r169920  
    164164    RELEASE_ASSERT(body->ident().isNull());
    165165
    166     UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, body, true, UnlinkedNormalFunction);
     166    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, body, UnlinkedNormalFunction);
    167167    functionExecutable->m_nameValue.set(vm, functionExecutable, jsString(&vm, name.string()));
    168168
Note: See TracChangeset for help on using the changeset viewer.