Changeset 38298 in webkit for trunk/JavaScriptCore/wtf


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/wtf/Vector.h

    r38285 r38298  
    495495        void reserveCapacity(size_t newCapacity);
    496496        void shrinkCapacity(size_t newCapacity);
     497        void shrinkToFit() { shrinkCapacity(size()); }
    497498
    498499        void clear() { shrinkCapacity(0); }
Note: See TracChangeset for help on using the changeset viewer.