Ignore:
Timestamp:
Nov 11, 2008, 1:51:31 AM (17 years ago)
Author:
[email protected]
Message:

2008-11-11 Maciej Stachowiak <[email protected]>

Reviewed by Mark Rowe.


  • shrink CodeBlock and AST related Vectors to exact fit (5-10M savings on membuster test)


No perf regression combined with the last patch (each seems like a small regression individually)

  • bytecompiler/CodeGenerator.cpp: (JSC::CodeGenerator::generate):
  • parser/Nodes.h: (JSC::SourceElements::releaseContentsIntoVector):
  • wtf/Vector.h: (WTF::Vector::shrinkToFit):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/CodeGenerator.cpp

    r38290 r38298  
    146146        m_scopeNode->functionStack().shrinkCapacity(0);
    147147    }
     148   
     149    m_codeBlock->instructions.shrinkToFit();
     150    m_codeBlock->globalResolveInstructions.shrinkToFit();
     151    m_codeBlock->propertyAccessInstructions.shrinkToFit();
     152    m_codeBlock->callLinkInfos.shrinkToFit();
     153    m_codeBlock->linkedCallerList.shrinkToFit();
     154
     155    m_codeBlock->identifiers.shrinkToFit();
     156    m_codeBlock->functions.shrinkToFit();
     157    m_codeBlock->functionExpressions.shrinkToFit();
     158    m_codeBlock->constantRegisters.shrinkToFit();
     159    m_codeBlock->unexpectedConstants.shrinkToFit();
     160    m_codeBlock->regexps.shrinkToFit();
     161    m_codeBlock->exceptionHandlers.shrinkToFit();
     162    m_codeBlock->expressionInfo.shrinkToFit();
     163    m_codeBlock->lineInfo.shrinkToFit();
     164
     165    m_codeBlock->immediateSwitchJumpTables.shrinkToFit();
     166    m_codeBlock->characterSwitchJumpTables.shrinkToFit();
     167    m_codeBlock->stringSwitchJumpTables.shrinkToFit();
     168
    148169}
    149170
Note: See TracChangeset for help on using the changeset viewer.