Ignore:
Timestamp:
Jul 8, 2018, 10:59:25 AM (7 years ago)
Author:
Yusuke Suzuki
Message:

[JSC] Optimize layout of CodeBlock to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=187441

Reviewed by Mark Lam.

Arrange the order of members to reduce the size of CodeBlock from 552 to 544.
We also make SourceCodeRepresentation 1 byte since CodeBlock has a vector of this,
Vector<SourceCodeRepresentation> m_constantsSourceCodeRepresentation.

We also move m_numCalleeLocals and m_numVars from public to private in CodeBlock.

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::dumpBlock):

  • bytecode/BytecodeUseDef.h:

(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numVars const):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::numVars const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::forAllLocalsLiveInBytecode):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct const):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::dumpRegisters):

  • jit/JIT.cpp:

(JSC::JIT::frameRegisterCountFor):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_enter):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter):

  • jit/JITOperations.cpp:
  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::frameRegisterCountFor):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSCJSValue.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntrypointCreationPhase.cpp

    r221637 r233630  
    9595        NodeOrigin origin = NodeOrigin(CodeOrigin(0), CodeOrigin(0), false);
    9696       
    97         Vector<Node*> locals(baseline->m_numCalleeLocals);
    98         for (int local = 0; local < baseline->m_numCalleeLocals; ++local) {
     97        Vector<Node*> locals(baseline->numCalleeLocals());
     98        for (int local = 0; local < baseline->numCalleeLocals(); ++local) {
    9999            Node* previousHead = target->variablesAtHead.local(local);
    100100            if (!previousHead)
     
    127127        }
    128128
    129         for (int local = 0; local < baseline->m_numCalleeLocals; ++local) {
     129        for (int local = 0; local < baseline->numCalleeLocals(); ++local) {
    130130            Node* previousHead = target->variablesAtHead.local(local);
    131131            if (!previousHead)
Note: See TracChangeset for help on using the changeset viewer.