Changeset 162281 in webkit
- Timestamp:
- Jan 18, 2014 3:35:34 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r162279 r162281 1 2014-01-18 Andreas Kling <akling@apple.com> 2 3 CodeBlock: Size m_function{Exprs,Decls} to fit from creation. 4 <https://webkit.org/b/127238> 5 6 Reviewed by Anders Carlsson. 7 8 * bytecode/CodeBlock.cpp: 9 (JSC::CodeBlock::CodeBlock): 10 11 Use resizeToFit() instead of grow() for m_functionExprs and 12 m_functionDecls since we know they will never change size. 13 14 (JSC::CodeBlock::shrinkToFit): 15 16 No need to shrink them here anymore. 17 1 18 2014-01-18 Andreas Kling <akling@apple.com> 2 19 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r162279 r162281 1559 1559 if (unlinkedCodeBlock->usesGlobalObject()) 1560 1560 m_constantRegisters[unlinkedCodeBlock->globalObjectRegister().offset()].set(*m_vm, ownerExecutable, m_globalObject.get()); 1561 m_functionDecls. grow(unlinkedCodeBlock->numberOfFunctionDecls());1561 m_functionDecls.resizeToFit(unlinkedCodeBlock->numberOfFunctionDecls()); 1562 1562 for (size_t count = unlinkedCodeBlock->numberOfFunctionDecls(), i = 0; i < count; ++i) { 1563 1563 UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl(i); … … 1575 1575 } 1576 1576 1577 m_functionExprs. grow(unlinkedCodeBlock->numberOfFunctionExprs());1577 m_functionExprs.resizeToFit(unlinkedCodeBlock->numberOfFunctionExprs()); 1578 1578 for (size_t count = unlinkedCodeBlock->numberOfFunctionExprs(), i = 0; i < count; ++i) { 1579 1579 UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr(i); … … 2591 2591 2592 2592 if (shrinkMode == EarlyShrink) { 2593 m_functionDecls.shrinkToFit();2594 m_functionExprs.shrinkToFit();2595 2593 m_constantRegisters.shrinkToFit(); 2596 2594
Note: See TracChangeset
for help on using the changeset viewer.