Changeset 142387 in webkit


Ignore:
Timestamp:
Feb 9, 2013 10:41:34 PM (11 years ago)
Author:
akling@apple.com
Message:

Shrink-wrap UnlinkedCodeBlock members.
<http://webkit.org/b/109368>

Reviewed by Oliver Hunt.

Rearrange the members of UnlinkedCodeBlock to avoid unnecessary padding on 64-bit.
Knocks ~600 KB off of the Membuster3 peak.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(UnlinkedCodeBlock):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r142377 r142387  
     12013-02-09  Andreas Kling  <akling@apple.com>
     2
     3        Shrink-wrap UnlinkedCodeBlock members.
     4        <http://webkit.org/b/109368>
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Rearrange the members of UnlinkedCodeBlock to avoid unnecessary padding on 64-bit.
     9        Knocks ~600 KB off of the Membuster3 peak.
     10
     11        * bytecode/UnlinkedCodeBlock.cpp:
     12        (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
     13        * bytecode/UnlinkedCodeBlock.h:
     14        (UnlinkedCodeBlock):
     15
    1162013-02-08  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r141050 r142387  
    161161    , m_numCalleeRegisters(0)
    162162    , m_numParameters(0)
    163     , m_globalData(globalData)
    164163    , m_argumentsRegister(-1)
    165164    , m_needsFullScopeChain(info.m_needsActivation)
     
    169168    , m_isConstructor(info.m_isConstructor)
    170169    , m_hasCapturedVariables(false)
     170    , m_codeType(codeType)
     171    , m_features(0)
    171172    , m_firstLine(0)
    172173    , m_lineCount(0)
    173     , m_features(0)
    174     , m_codeType(codeType)
    175174    , m_resolveOperationCount(0)
    176175    , m_putToBaseOperationCount(1)
     
    180179    , m_valueProfileCount(0)
    181180    , m_llintCallLinkInfoCount(0)
     181    , m_globalData(globalData)
    182182#if ENABLE(BYTECODE_COMMENTS)
    183183    , m_bytecodeCommentIterator(0)
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h

    r141050 r142387  
    487487
    488488    int m_numParameters;
    489     JSGlobalData* m_globalData;
    490 
    491489    int m_thisRegister;
    492490    int m_argumentsRegister;
     
    499497    bool m_isConstructor : 1;
    500498    bool m_hasCapturedVariables : 1;
     499    CodeType m_codeType : 2;
     500    CodeFeatures m_features : 16;
     501
    501502    unsigned m_firstLine;
    502503    unsigned m_lineCount;
    503 
    504     CodeFeatures m_features;
    505     CodeType m_codeType;
    506 
    507     Vector<unsigned> m_jumpTargets;
    508 
    509     // Constant Pools
    510     Vector<Identifier> m_identifiers;
    511     Vector<WriteBarrier<Unknown> > m_constantRegisters;
    512     typedef Vector<WriteBarrier<UnlinkedFunctionExecutable> > FunctionExpressionVector;
    513     FunctionExpressionVector m_functionDecls;
    514     FunctionExpressionVector m_functionExprs;
    515 
    516     WriteBarrier<SharedSymbolTable> m_symbolTable;
    517 
    518     Vector<LineInfo> m_lineInfo;
    519 
    520     Vector<unsigned> m_propertyAccessInstructions;
    521 
    522 #if ENABLE(BYTECODE_COMMENTS)
    523     Vector<Comment>  m_bytecodeComments;
    524     size_t m_bytecodeCommentIterator;
    525 #endif
    526504
    527505    unsigned m_resolveOperationCount;
     
    533511    unsigned m_llintCallLinkInfoCount;
    534512
     513    JSGlobalData* m_globalData;
     514
     515    Vector<unsigned> m_jumpTargets;
     516
     517    // Constant Pools
     518    Vector<Identifier> m_identifiers;
     519    Vector<WriteBarrier<Unknown> > m_constantRegisters;
     520    typedef Vector<WriteBarrier<UnlinkedFunctionExecutable> > FunctionExpressionVector;
     521    FunctionExpressionVector m_functionDecls;
     522    FunctionExpressionVector m_functionExprs;
     523
     524    WriteBarrier<SharedSymbolTable> m_symbolTable;
     525
     526    Vector<LineInfo> m_lineInfo;
     527
     528    Vector<unsigned> m_propertyAccessInstructions;
     529
     530#if ENABLE(BYTECODE_COMMENTS)
     531    Vector<Comment>  m_bytecodeComments;
     532    size_t m_bytecodeCommentIterator;
     533#endif
     534
    535535public:
    536536    struct RareData {
Note: See TracChangeset for help on using the changeset viewer.