Skip to content
  • akling@apple.com's avatar
    Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size. · 8db55015
    akling@apple.com authored
    <http://webkit.org/b/97268>
    <rdar://problem/12376519>
    
    Reviewed by Sam Weinig.
    
    Source/JavaScriptCore:
    
    Update LLInt WTF::Vector offset constants to match the new memory layout.
    
    * llint/LowLevelInterpreter.asm:
    
    Source/WebCore:
    
    * CMakeLists.txt: Add a workaround for GCC 4.6.x in Release mode so it
    does not crash.
    
    Source/WTF:
    
    Shrink Vector by 8 bytes on 64-bit by using 32-bit capacity and size.
    Vector now inherits from VectorBuffer instead of having a VectorBuffer member;
    this is necessary for m_size to fall into the padding after the base class members.
    
    The WTF::Vector API still uses size_t.
    
    Based on Blink r148313 by <cevans@chromium.org>.
    
    * wtf/SizeLimits.cpp:
    * wtf/Vector.h:
    (WTF::VectorBufferBase::allocateBuffer):
    (WTF::VectorBufferBase::tryAllocateBuffer):
    (VectorBufferBase):
    (WTF::VectorBuffer::shouldReallocateBuffer):
    (Vector):
    (WTF::Vector::Vector):
    (WTF::Vector::capacity):
    (WTF::Vector::at):
    (WTF::Vector::data):
    (WTF::Vector::swap):
    (WTF::::Vector):
    (WTF::::reserveCapacity):
    (WTF::::tryReserveCapacity):
    (WTF::::reserveInitialCapacity):
    (WTF::::shrinkCapacity):
    (WTF::::releaseBuffer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    8db55015