Changeset 176709 in webkit


Ignore:
Timestamp:
Dec 2, 2014 8:14:49 PM (9 years ago)
Author:
mark.lam@apple.com
Message:

Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
https://bugs.webkit.org/show_bug.cgi?id=138821

Not reviewed.

Source/JavaScriptCore:

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::visitChildren):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitComplexPopScopes):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):

  • ftl/FTLAbbreviations.h:

(JSC::FTL::mdNode):
(JSC::FTL::buildCall):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • parser/Parser.h:

(JSC::Scope::Scope):

  • runtime/JSArray.cpp:

(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::sortCompactedVector):

  • tools/ProfileTreeNode.h:

(JSC::ProfileTreeNode::dumpInternal):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::matchCharacterClass):

Source/WebCore:

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::deserializeString):

  • editing/TextIterator.cpp:

(WebCore::SearchBuffer::isBadMatch):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::buildSelectionHighlight):

  • platform/graphics/SegmentedFontData.cpp:

(WebCore::SegmentedFontData::fontDataForCharacter):
(WebCore::SegmentedFontData::containsCharacter):
(WebCore::SegmentedFontData::isLoading):

  • platform/graphics/WOFFFileFormat.cpp:

(WebCore::convertWOFFToSfnt):

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformGradient):

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::clearFrameBufferCache):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintFillLayers):

  • rendering/style/GridResolvedPosition.cpp:

(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):

  • svg/SVGFontElement.cpp:

(WebCore::kerningForPairOfStringsAndGlyphs):

  • svg/SVGPathByteStream.h:

(WebCore::SVGPathByteStream::append):

  • xml/XPathNodeSet.h:

(WebCore::XPath::NodeSet::begin):
(WebCore::XPath::NodeSet::end):

Source/WTF:

  • WTF.vcxproj/WTF.vcxproj:
  • WTF.vcxproj/WTF.vcxproj.filters:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/IndexedIterator.h: Removed.
  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):

  • wtf/Vector.h:

(WTF::Vector::Vector):
(WTF::Vector::begin):
(WTF::Vector::end):
(WTF::OverflowHandler>::Vector):
(WTF::=):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::appendSlowCase):
(WTF::OverflowHandler>::uncheckedAppend):
(WTF::OverflowHandler>::appendVector):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):

Location:
trunk/Source
Files:
1 deleted
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r176700 r176709  
     12014-12-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
     4        https://bugs.webkit.org/show_bug.cgi?id=138821
     5
     6        Not reviewed.
     7
     8        * bytecode/UnlinkedCodeBlock.cpp:
     9        (JSC::UnlinkedCodeBlock::visitChildren):
     10        * bytecompiler/BytecodeGenerator.cpp:
     11        (JSC::BytecodeGenerator::emitComplexPopScopes):
     12        * dfg/DFGSpeculativeJIT.cpp:
     13        (JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
     14        * ftl/FTLAbbreviations.h:
     15        (JSC::FTL::mdNode):
     16        (JSC::FTL::buildCall):
     17        * llint/LLIntData.cpp:
     18        (JSC::LLInt::Data::performAssertions):
     19        * parser/Parser.h:
     20        (JSC::Scope::Scope):
     21        * runtime/JSArray.cpp:
     22        (JSC::JSArray::setLengthWithArrayStorage):
     23        (JSC::JSArray::sortCompactedVector):
     24        * tools/ProfileTreeNode.h:
     25        (JSC::ProfileTreeNode::dumpInternal):
     26        * yarr/YarrJIT.cpp:
     27        (JSC::Yarr::YarrGenerator::matchCharacterClass):
     28
    1292014-12-02  Michael Saboff  <msaboff@apple.com>
    230
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r176592 r176709  
    235235    visitor.append(&thisObject->m_symbolTable);
    236236    for (FunctionExpressionVector::iterator ptr = thisObject->m_functionDecls.begin(), end = thisObject->m_functionDecls.end(); ptr != end; ++ptr)
    237         visitor.append(WTF::getPtr(ptr));
     237        visitor.append(ptr);
    238238    for (FunctionExpressionVector::iterator ptr = thisObject->m_functionExprs.begin(), end = thisObject->m_functionExprs.end(); ptr != end; ++ptr)
    239         visitor.append(WTF::getPtr(ptr));
     239        visitor.append(ptr);
    240240    visitor.appendValues(thisObject->m_constantRegisters.data(), thisObject->m_constantRegisters.size());
    241241    if (thisObject->m_rareData) {
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r176592 r176709  
    22722272            int bottomScopeIndex = -1;
    22732273            if (flipScopes) {
    2274                 topScopeIndex = topScope - m_scopeContextStack.data();
    2275                 bottomScopeIndex = bottomScope - m_scopeContextStack.data();
     2274                topScopeIndex = topScope - m_scopeContextStack.begin();
     2275                bottomScopeIndex = bottomScope - m_scopeContextStack.begin();
    22762276                savedScopeContextStack = m_scopeContextStack;
    22772277                m_scopeContextStack.shrink(finallyContext.scopeContextStackSize);
     
    23172317                m_scopeContextStack = savedScopeContextStack;
    23182318                topScope = &m_scopeContextStack[topScopeIndex]; // assert it's within bounds
    2319                 bottomScope = m_scopeContextStack.data() + bottomScopeIndex; // don't assert, since it the index might be -1.
     2319                bottomScope = m_scopeContextStack.begin() + bottomScopeIndex; // don't assert, since it the index might be -1.
    23202320            }
    23212321            if (flipSwitches)
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r176592 r176709  
    49114911        m_jit.branch32(JITCompiler::AboveOrEqual, value, Imm32(table.ctiOffsets.size())),
    49124912        data->fallThrough.block);
    4913     m_jit.move(TrustedImmPtr(table.ctiOffsets.data()), scratch);
     4913    m_jit.move(TrustedImmPtr(table.ctiOffsets.begin()), scratch);
    49144914    m_jit.loadPtr(JITCompiler::BaseIndex(scratch, value, JITCompiler::timesPtr()), scratch);
    49154915    m_jit.jump(scratch);
  • trunk/Source/JavaScriptCore/ftl/FTLAbbreviations.h

    r176592 r176709  
    121121static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return llvm->MDNodeInContext(context, args, numArgs); }
    122122template<typename VectorType>
    123 static inline LValue mdNode(LContext context, const VectorType& vector) { return mdNode(context, const_cast<LValue*>(vector.data()), vector.size()); }
     123static inline LValue mdNode(LContext context, const VectorType& vector) { return mdNode(context, const_cast<LValue*>(vector.begin()), vector.size()); }
    124124static inline LValue mdNode(LContext context) { return mdNode(context, 0, 0); }
    125125static inline LValue mdNode(LContext context, LValue arg1) { return mdNode(context, &arg1, 1); }
     
    289289inline LValue buildCall(LBuilder builder, LValue function, const VectorType& vector)
    290290{
    291     return buildCall(builder, function, vector.data(), vector.size());
     291    return buildCall(builder, function, vector.begin(), vector.size());
    292292}
    293293static inline LValue buildCall(LBuilder builder, LValue function)
  • trunk/Source/JavaScriptCore/llint/LLIntData.cpp

    r176592 r176709  
    162162    testVector.resize(42);
    163163    ASSERT(bitwise_cast<uint32_t*>(&testVector)[sizeof(void*)/sizeof(uint32_t) + 1] == 42);
    164     ASSERT(bitwise_cast<int**>(&testVector)[0] == testVector.data());
     164    ASSERT(bitwise_cast<int**>(&testVector)[0] == testVector.begin());
    165165#endif
    166166
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r176592 r176709  
    131131        if (rhs.m_labels) {
    132132            m_labels = adoptPtr(new LabelStack);
    133             for (auto label : *rhs.m_labels)
    134                 m_labels->append(ScopeLabelInfo(label.m_ident, label.m_isLoop));
     133
     134            typedef LabelStack::const_iterator iterator;
     135            iterator end = rhs.m_labels->end();
     136            for (iterator it = rhs.m_labels->begin(); it != end; ++it)
     137                m_labels->append(ScopeLabelInfo(it->m_ident, it->m_isLoop));
    135138        }
    136139    }
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r176592 r176709  
    353353            // delete values in any order.
    354354            if (map->sparseMode()) {
    355                 qsort(keys.data(), keys.size(), sizeof(unsigned), compareKeysForQSort);
     355                qsort(keys.begin(), keys.size(), sizeof(unsigned), compareKeysForQSort);
    356356                unsigned i = keys.size();
    357357                while (i) {
     
    11921192#if HAVE(MERGESORT)
    11931193    if (isSortingPrimitiveValues)
    1194         qsort(values.data(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
     1194        qsort(values.begin(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
    11951195    else
    1196         mergesort(values.data(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
     1196        mergesort(values.begin(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
    11971197#else
    11981198    // FIXME: The qsort library function is likely to not be a stable sort.
    11991199    // ECMAScript-262 does not specify a stable sort, but in practice, browsers perform a stable sort.
    1200     qsort(values.data(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
     1200    qsort(values.begin(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);
    12011201#endif
    12021202   
  • trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h

    r176592 r176709  
    8787        for (Map::iterator it = m_children->begin(); it != m_children->end(); ++it)
    8888            entries.append(&*it);
    89         qsort(entries.data(), entries.size(), sizeof(MapEntry*), compareEntries);
     89        qsort(entries.begin(), entries.size(), sizeof(MapEntry*), compareEntries);
    9090
    9191        // Iterate over the children in sample-frequency order.
  • trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp

    r176592 r176709  
    224224            unsigned matchIndex = 0;
    225225            JumpList failures;
    226             matchCharacterClassRange(character, failures, matchDest, charClass->m_ranges.data(), charClass->m_ranges.size(), &matchIndex, charClass->m_matches.data(), charClass->m_matches.size());
     226            matchCharacterClassRange(character, failures, matchDest, charClass->m_ranges.begin(), charClass->m_ranges.size(), &matchIndex, charClass->m_matches.begin(), charClass->m_matches.size());
    227227            while (matchIndex < charClass->m_matches.size())
    228228                matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++])));
  • trunk/Source/WTF/ChangeLog

    r176705 r176709  
     12014-12-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
     4        https://bugs.webkit.org/show_bug.cgi?id=138821
     5
     6        Not reviewed.
     7
     8        * WTF.vcxproj/WTF.vcxproj:
     9        * WTF.vcxproj/WTF.vcxproj.filters:
     10        * WTF.xcodeproj/project.pbxproj:
     11        * wtf/IndexedIterator.h: Removed.
     12        * wtf/RefCountedArray.h:
     13        (WTF::RefCountedArray::RefCountedArray):
     14        * wtf/Vector.h:
     15        (WTF::Vector::Vector):
     16        (WTF::Vector::begin):
     17        (WTF::Vector::end):
     18        (WTF::OverflowHandler>::Vector):
     19        (WTF::=):
     20        (WTF::OverflowHandler>::fill):
     21        (WTF::OverflowHandler>::expandCapacity):
     22        (WTF::OverflowHandler>::tryExpandCapacity):
     23        (WTF::OverflowHandler>::resize):
     24        (WTF::OverflowHandler>::shrink):
     25        (WTF::OverflowHandler>::grow):
     26        (WTF::OverflowHandler>::reserveCapacity):
     27        (WTF::OverflowHandler>::tryReserveCapacity):
     28        (WTF::OverflowHandler>::shrinkCapacity):
     29        (WTF::OverflowHandler>::append):
     30        (WTF::OverflowHandler>::tryAppend):
     31        (WTF::OverflowHandler>::appendSlowCase):
     32        (WTF::OverflowHandler>::uncheckedAppend):
     33        (WTF::OverflowHandler>::appendVector):
     34        (WTF::OverflowHandler>::insert):
     35        (WTF::OverflowHandler>::insertVector):
     36        (WTF::OverflowHandler>::remove):
     37
    1382014-12-02  Oliver Hunt  <oliver@apple.com>
    239
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj

    r176683 r176709  
    220220    <ClInclude Include="..\wtf\HashTraits.h" />
    221221    <ClInclude Include="..\wtf\HexNumber.h" />
    222     <ClInclude Include="..\wtf\IndexedIterator.h" />
    223222    <ClInclude Include="..\wtf\IteratorAdaptors.h" />
    224223    <ClInclude Include="..\wtf\IteratorRange.h" />
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters

    r176592 r176709  
    466466    </ClInclude>
    467467    <ClInclude Include="..\wtf\HexNumber.h">
    468       <Filter>wtf</Filter>
    469     </ClInclude>
    470     <ClInclude Include="..\wtf\IndexedIterator.h">
    471468      <Filter>wtf</Filter>
    472469    </ClInclude>
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r176683 r176709  
    101101                A748745317A0BDAE00FA04CB /* SixCharacterHash.h in Headers */ = {isa = PBXBuildFile; fileRef = A748745017A0BDAE00FA04CB /* SixCharacterHash.h */; };
    102102                A748745417A0BDAE00FA04CB /* StringHashDumpContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A748745117A0BDAE00FA04CB /* StringHashDumpContext.h */; };
    103                 A7DC2F041A09A22D0072F4E3 /* IndexedIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DC2F031A099DE30072F4E3 /* IndexedIterator.h */; };
    104103                A7E643C617C5423B003BB16B /* Compression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E643C417C5423B003BB16B /* Compression.cpp */; };
    105104                A7E643C717C5423B003BB16B /* Compression.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E643C517C5423B003BB16B /* Compression.h */; };
     
    395394                A748745017A0BDAE00FA04CB /* SixCharacterHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SixCharacterHash.h; sourceTree = "<group>"; };
    396395                A748745117A0BDAE00FA04CB /* StringHashDumpContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringHashDumpContext.h; sourceTree = "<group>"; };
    397                 A7DC2F031A099DE30072F4E3 /* IndexedIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IndexedIterator.h; sourceTree = "<group>"; };
    398396                A7E643C417C5423B003BB16B /* Compression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Compression.cpp; sourceTree = "<group>"; };
    399397                A7E643C517C5423B003BB16B /* Compression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compression.h; sourceTree = "<group>"; };
     
    901899                                A8A4737A151A825B004123FF /* WTFThreadData.cpp */,
    902900                                A8A4737B151A825B004123FF /* WTFThreadData.h */,
    903                                 A7DC2F031A099DE30072F4E3 /* IndexedIterator.h */,
    904901                        );
    905902                        path = wtf;
     
    10751072                                A8A4745E151A825B004123FF /* CharacterNames.h in Headers */,
    10761073                                A8A47394151A825B004123FF /* CheckedArithmetic.h in Headers */,
    1077                                 A7DC2F041A09A22D0072F4E3 /* IndexedIterator.h in Headers */,
    10781074                                A8A47395151A825B004123FF /* CheckedBoolean.h in Headers */,
    10791075                                A8A4745F151A825B004123FF /* Collator.h in Headers */,
  • trunk/Source/WTF/wtf/RefCountedArray.h

    r176592 r176709  
    8484        Header::fromPayload(m_data)->length = other.size();
    8585        ASSERT(Header::fromPayload(m_data)->length == other.size());
    86         VectorTypeOperations<T>::uninitializedCopy(getPtr(other.begin()), getPtr(other.end()), m_data);
     86        VectorTypeOperations<T>::uninitializedCopy(other.begin(), other.end(), m_data);
    8787    }
    8888   
  • trunk/Source/WTF/wtf/Vector.h

    r176592 r176709  
    2929#include <wtf/CheckedArithmetic.h>
    3030#include <wtf/FastMalloc.h>
    31 #include <wtf/GetPtr.h>
    32 #include <wtf/IndexedIterator.h>
    3331#include <wtf/MallocPtr.h>
    3432#include <wtf/Noncopyable.h>
     
    557555    WTF_MAKE_FAST_ALLOCATED;
    558556private:
    559 
    560557    typedef VectorBuffer<T, inlineCapacity> Base;
    561558    typedef VectorTypeOperations<T> TypeOperations;
    562     typedef IndexedIteratorSelector<Vector, OverflowHandler> IteratorSelector;
    563559
    564560public:
    565561    typedef T ValueType;
    566562
    567     typedef typename IteratorSelector::iterator iterator;
    568     typedef typename IteratorSelector::const_iterator const_iterator;
    569 
     563    typedef T* iterator;
     564    typedef const T* const_iterator;
    570565    typedef std::reverse_iterator<iterator> reverse_iterator;
    571566    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
     
    580575    {
    581576        if (begin())
    582             TypeOperations::initialize(getPtr(begin()), getPtr(end()));
     577            TypeOperations::initialize(begin(), end());
    583578    }
    584579
     
    587582    {
    588583        if (begin())
    589             TypeOperations::uninitializedFill(getPtr(begin()), getPtr(end()), val);
     584            TypeOperations::uninitializedFill(begin(), end(), val);
    590585    }
    591586
     
    651646    static ptrdiff_t dataMemoryOffset() { return Base::bufferMemoryOffset(); }
    652647
    653     iterator begin() { return IteratorSelector::makeIterator(*this, data()); }
    654     iterator end() { return begin() + size(); }
    655     const_iterator begin() const { return IteratorSelector::makeConstIterator(*this, data()); }
    656     const_iterator end() const { return begin() + size(); }
     648    iterator begin() { return data(); }
     649    iterator end() { return begin() + m_size; }
     650    const_iterator begin() const { return data(); }
     651    const_iterator end() const { return begin() + m_size; }
    657652
    658653    reverse_iterator rbegin() { return reverse_iterator(end()); }
     
    689684    void clear() { shrinkCapacity(0); }
    690685
    691     void append(const_iterator, unsigned);
    692686    template<typename U> void append(const U*, unsigned);
    693687    template<typename U> void append(U&&);
     
    753747{
    754748    if (begin())
    755         TypeOperations::uninitializedCopy(getPtr(other.begin()), getPtr(other.end()), getPtr(begin()));
     749        TypeOperations::uninitializedCopy(other.begin(), other.end(), begin());
    756750}
    757751
     
    762756{
    763757    if (begin())
    764         TypeOperations::uninitializedCopy(getPtr(other.begin()), getPtr(other.end()), getPtr(begin()));
     758        TypeOperations::uninitializedCopy(other.begin(), other.end(), begin());
    765759}
    766760
     
    779773    }
    780774   
    781     std::copy(getPtr(other.begin()), getPtr(other.begin() + size()), getPtr(begin()));
    782     TypeOperations::uninitializedCopy(getPtr(other.begin() + size()), getPtr(other.end()), getPtr(end()));
     775    std::copy(other.begin(), other.begin() + size(), begin());
     776    TypeOperations::uninitializedCopy(other.begin() + size(), other.end(), end());
    783777    m_size = other.size();
    784778
     
    804798        ASSERT(begin());
    805799    }
    806 
    807     std::copy(getPtr(other.begin()), getPtr(other.begin() + size()), getPtr(begin()));
    808     TypeOperations::uninitializedCopy(getPtr(other.begin() + size()), getPtr(other.end()), getPtr(end()));
     800   
     801    std::copy(other.begin(), other.begin() + size(), begin());
     802    TypeOperations::uninitializedCopy(other.begin() + size(), other.end(), end());
    809803    m_size = other.size();
    810804
     
    866860    }
    867861   
    868     std::fill(getPtr(begin()), getPtr(end()), val);
    869     TypeOperations::uninitializedFill(getPtr(end()), getPtr(begin()) + newSize, val);
     862    std::fill(begin(), end(), val);
     863    TypeOperations::uninitializedFill(end(), begin() + newSize, val);
    870864    m_size = newSize;
    871865}
     
    888882T* Vector<T, inlineCapacity, OverflowHandler>::expandCapacity(unsigned newMinCapacity, T* ptr)
    889883{
    890     if (ptr < getPtr(begin()) || ptr >= getPtr(end())) {
     884    if (ptr < begin() || ptr >= end()) {
    891885        expandCapacity(newMinCapacity);
    892886        return ptr;
    893887    }
    894     unsigned index = ptr - getPtr(begin());
     888    unsigned index = ptr - begin();
    895889    expandCapacity(newMinCapacity);
    896     return getPtr(begin()) + index;
     890    return begin() + index;
    897891}
    898892
     
    906900const T* Vector<T, inlineCapacity, OverflowHandler>::tryExpandCapacity(unsigned newMinCapacity, const T* ptr)
    907901{
    908     if (ptr < getPtr(begin()) || ptr >= getPtr(end())) {
     902    if (ptr < begin() || ptr >= end()) {
    909903        if (!tryExpandCapacity(newMinCapacity))
    910904            return 0;
    911905        return ptr;
    912906    }
    913     unsigned index = ptr - getPtr(begin());
     907    unsigned index = ptr - begin();
    914908    if (!tryExpandCapacity(newMinCapacity))
    915909        return 0;
    916     return getPtr(begin()) + index;
     910    return begin() + index;
    917911}
    918912
     
    928922{
    929923    if (size <= m_size)
    930         TypeOperations::destruct(getPtr(begin()) + size, getPtr(end()));
     924        TypeOperations::destruct(begin() + size, end());
    931925    else {
    932926        if (size > capacity())
    933927            expandCapacity(size);
    934928        if (begin())
    935             TypeOperations::initialize(getPtr(end()), getPtr(begin()) + size);
     929            TypeOperations::initialize(end(), begin() + size);
    936930    }
    937931   
     
    950944{
    951945    ASSERT(size <= m_size);
    952     TypeOperations::destruct(getPtr(begin()) + size, getPtr(end()));
     946    TypeOperations::destruct(begin() + size, end());
    953947    m_size = size;
    954948}
     
    961955        expandCapacity(size);
    962956    if (begin())
    963         TypeOperations::initialize(getPtr(end()), getPtr(begin()) + size);
     957        TypeOperations::initialize(end(), begin() + size);
    964958    m_size = size;
    965959}
     
    970964    if (newCapacity <= capacity())
    971965        return;
    972     T* oldBuffer = getPtr(begin());
    973     T* oldEnd = getPtr(end());
     966    T* oldBuffer = begin();
     967    T* oldEnd = end();
    974968    Base::allocateBuffer(newCapacity);
    975969    ASSERT(begin());
    976     TypeOperations::move(oldBuffer, oldEnd, getPtr(begin()));
     970    TypeOperations::move(oldBuffer, oldEnd, begin());
    977971    Base::deallocateBuffer(oldBuffer);
    978972}
     
    983977    if (newCapacity <= capacity())
    984978        return true;
    985     T* oldBuffer = getPtr(begin());
    986     T* oldEnd = getPtr(end());
     979    T* oldBuffer = begin();
     980    T* oldEnd = end();
    987981    if (!Base::tryAllocateBuffer(newCapacity))
    988982        return false;
    989983    ASSERT(begin());
    990     TypeOperations::move(oldBuffer, oldEnd, getPtr(begin()));
     984    TypeOperations::move(oldBuffer, oldEnd, begin());
    991985    Base::deallocateBuffer(oldBuffer);
    992986    return true;
     
    10111005        shrink(newCapacity);
    10121006
    1013     T* oldBuffer = getPtr(begin());
     1007    T* oldBuffer = begin();
    10141008    if (newCapacity > 0) {
    10151009        if (Base::shouldReallocateBuffer(newCapacity)) {
     
    10181012        }
    10191013
    1020         T* oldEnd = getPtr(end());
     1014        T* oldEnd = end();
    10211015        Base::allocateBuffer(newCapacity);
    1022         if (getPtr(begin()) != oldBuffer)
    1023             TypeOperations::move(oldBuffer, oldEnd, getPtr(begin()));
     1016        if (begin() != oldBuffer)
     1017            TypeOperations::move(oldBuffer, oldEnd, begin());
    10241018    }
    10251019
     
    10411035    if (newSize < m_size)
    10421036        CRASH();
    1043     T* dest = getPtr(end());
     1037    T* dest = end();
    10441038    VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], dest);
    10451039    m_size = newSize;
    1046 }
    1047 
    1048 template<typename T, unsigned inlineCapacity, typename OverflowHandler>
    1049 void Vector<T, inlineCapacity, OverflowHandler>::append(const_iterator data, unsigned dataSize)
    1050 {
    1051     append(getPtr(data), dataSize);
    10521040}
    10531041
     
    10641052    if (newSize < m_size)
    10651053        return false;
    1066     T* dest = getPtr(end());
     1054    T* dest = end();
    10671055    VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], dest);
    10681056    m_size = newSize;
     
    10741062{
    10751063    if (size() != capacity()) {
    1076         new (NotNull, getPtr(end())) T(std::forward<U>(value));
     1064        new (NotNull, end()) T(std::forward<U>(value));
    10771065        ++m_size;
    10781066        return;
     
    10911079    ASSERT(begin());
    10921080
    1093     new (NotNull, getPtr(end())) T(std::forward<U>(*ptr));
     1081    new (NotNull, end()) T(std::forward<U>(*ptr));
    10941082    ++m_size;
    10951083}
     
    11041092
    11051093    auto ptr = std::addressof(value);
    1106     new (NotNull, getPtr(end())) T(std::forward<U>(*ptr));
     1094    new (NotNull, end()) T(std::forward<U>(*ptr));
    11071095    ++m_size;
    11081096}
     
    11111099inline void Vector<T, inlineCapacity, OverflowHandler>::appendVector(const Vector<U, otherCapacity>& val)
    11121100{
    1113     append(getPtr(val.begin()), val.size());
     1101    append(val.begin(), val.size());
    11141102}
    11151103
     
    11251113    if (newSize < m_size)
    11261114        CRASH();
    1127     T* spot = getPtr(begin()) + position;
    1128     TypeOperations::moveOverlapping(spot, getPtr(end()), spot + dataSize);
     1115    T* spot = begin() + position;
     1116    TypeOperations::moveOverlapping(spot, end(), spot + dataSize);
    11291117    VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], spot);
    11301118    m_size = newSize;
     
    11421130    }
    11431131
    1144     T* spot = getPtr(begin()) + position;
    1145     TypeOperations::moveOverlapping(spot, getPtr(end()), spot + 1);
     1132    T* spot = begin() + position;
     1133    TypeOperations::moveOverlapping(spot, end(), spot + 1);
    11461134    new (NotNull, spot) T(std::forward<U>(*ptr));
    11471135    ++m_size;
     
    11511139inline void Vector<T, inlineCapacity, OverflowHandler>::insertVector(unsigned position, const Vector<U, c>& val)
    11521140{
    1153     insert(position, getPtr(val.begin()), val.size());
     1141    insert(position, val.begin(), val.size());
    11541142}
    11551143
     
    11581146{
    11591147    ASSERT_WITH_SECURITY_IMPLICATION(position < size());
    1160     T* spot = getPtr(begin()) + position;
     1148    T* spot = begin() + position;
    11611149    spot->~T();
    1162     TypeOperations::moveOverlapping(spot + 1, getPtr(end()), spot);
     1150    TypeOperations::moveOverlapping(spot + 1, end(), spot);
    11631151    --m_size;
    11641152}
     
    11691157    ASSERT_WITH_SECURITY_IMPLICATION(position <= size());
    11701158    ASSERT_WITH_SECURITY_IMPLICATION(position + length <= size());
    1171     T* beginSpot = getPtr(begin()) + position;
     1159    T* beginSpot = begin() + position;
    11721160    T* endSpot = beginSpot + length;
    11731161    TypeOperations::destruct(beginSpot, endSpot);
    1174     TypeOperations::moveOverlapping(endSpot, getPtr(end()), beginSpot);
     1162    TypeOperations::moveOverlapping(endSpot, end(), beginSpot);
    11751163    m_size -= length;
    11761164}
  • trunk/Source/WebCore/ChangeLog

    r176708 r176709  
     12014-12-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Rolling out r176592, r176603, r176616, and r176705 until build and perf issues are resolved.
     4        https://bugs.webkit.org/show_bug.cgi?id=138821
     5
     6        Not reviewed.
     7
     8        * bindings/js/SerializedScriptValue.cpp:
     9        (WebCore::CloneDeserializer::deserializeString):
     10        * editing/TextIterator.cpp:
     11        (WebCore::SearchBuffer::isBadMatch):
     12        * page/mac/ServicesOverlayController.mm:
     13        (WebCore::ServicesOverlayController::buildSelectionHighlight):
     14        * platform/graphics/SegmentedFontData.cpp:
     15        (WebCore::SegmentedFontData::fontDataForCharacter):
     16        (WebCore::SegmentedFontData::containsCharacter):
     17        (WebCore::SegmentedFontData::isLoading):
     18        * platform/graphics/WOFFFileFormat.cpp:
     19        (WebCore::convertWOFFToSfnt):
     20        * platform/graphics/cairo/GradientCairo.cpp:
     21        (WebCore::Gradient::platformGradient):
     22        * platform/image-decoders/gif/GIFImageDecoder.cpp:
     23        (WebCore::GIFImageDecoder::clearFrameBufferCache):
     24        * rendering/RenderBox.cpp:
     25        (WebCore::RenderBox::paintFillLayers):
     26        * rendering/style/GridResolvedPosition.cpp:
     27        (WebCore::firstNamedGridLineBeforePosition):
     28        (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
     29        * svg/SVGFontElement.cpp:
     30        (WebCore::kerningForPairOfStringsAndGlyphs):
     31        * svg/SVGPathByteStream.h:
     32        (WebCore::SVGPathByteStream::append):
     33        * xml/XPathNodeSet.h:
     34        (WebCore::XPath::NodeSet::begin):
     35        (WebCore::XPath::NodeSet::end):
     36
    1372014-12-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    238
  • trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp

    r176592 r176709  
    14381438        if (buffer.isEmpty())
    14391439            return String();
    1440         const uint8_t* ptr = getPtr(buffer.begin());
    1441         const uint8_t* end = getPtr(buffer.end());
     1440        const uint8_t* ptr = buffer.begin();
     1441        const uint8_t* end = buffer.end();
    14421442        uint32_t version;
    14431443        if (!readLittleEndian(ptr, end, version) || version > CurrentVersion)
  • trunk/Source/WebCore/editing/TextIterator.cpp

    r176592 r176709  
    20742074    normalizeCharacters(match, matchLength, m_normalizedMatch);
    20752075
    2076     const UChar* a = getPtr(m_normalizedTarget.begin());
    2077     const UChar* aEnd = getPtr(m_normalizedTarget.end());
    2078 
    2079     const UChar* b = getPtr(m_normalizedMatch.begin());
    2080     const UChar* bEnd = getPtr(m_normalizedMatch.end());
     2076    const UChar* a = m_normalizedTarget.begin();
     2077    const UChar* aEnd = m_normalizedTarget.end();
     2078
     2079    const UChar* b = m_normalizedMatch.begin();
     2080    const UChar* bEnd = m_normalizedMatch.end();
    20812081
    20822082    while (true) {
  • trunk/Source/WebCore/page/mac/ServicesOverlayController.mm

    r176682 r176709  
    543543        if (!cgRects.isEmpty()) {
    544544            CGRect visibleRect = mainFrameView->visibleContentRect();
    545             RetainPtr<DDHighlightRef> ddHighlight = adoptCF(DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection(nullptr, cgRects.data(), cgRects.size(), visibleRect, DDHighlightStyleBubbleNone | DDHighlightStyleStandardIconArrow | DDHighlightStyleButtonShowAlways, YES, NSWritingDirectionNatural, NO, YES));
     545            RetainPtr<DDHighlightRef> ddHighlight = adoptCF(DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection(nullptr, cgRects.begin(), cgRects.size(), visibleRect, DDHighlightStyleBubbleNone | DDHighlightStyleStandardIconArrow | DDHighlightStyleButtonShowAlways, YES, NSWritingDirectionNatural, NO, YES));
    546546           
    547547            newPotentialHighlights.add(Highlight::createForSelection(*this, ddHighlight, selectionRange));
  • trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp

    r176592 r176709  
    4040const SimpleFontData* SegmentedFontData::fontDataForCharacter(UChar32 c) const
    4141{
    42     auto end = m_ranges.end();
    43     for (auto it = m_ranges.begin(); it != end; ++it) {
     42    Vector<FontDataRange>::const_iterator end = m_ranges.end();
     43    for (Vector<FontDataRange>::const_iterator it = m_ranges.begin(); it != end; ++it) {
    4444        if (it->from() <= c && it->to() >= c)
    4545            return it->fontData().get();
     
    5050bool SegmentedFontData::containsCharacter(UChar32 c) const
    5151{
    52     auto end = m_ranges.end();
    53     for (auto it = m_ranges.begin(); it != end; ++it) {
     52    Vector<FontDataRange>::const_iterator end = m_ranges.end();
     53    for (Vector<FontDataRange>::const_iterator it = m_ranges.begin(); it != end; ++it) {
    5454        if (c >= it->from() && c <= it->to())
    5555            return true;
     
    7777bool SegmentedFontData::isLoading() const
    7878{
    79     auto end = m_ranges.end();
    80     for (auto it = m_ranges.begin(); it != end; ++it) {
     79    Vector<FontDataRange>::const_iterator end = m_ranges.end();
     80    for (Vector<FontDataRange>::const_iterator it = m_ranges.begin(); it != end; ++it) {
    8181        if (it->fontData()->isLoading())
    8282            return true;
  • trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp

    r176592 r176709  
    201201            if (!sfnt.tryReserveCapacity(sfnt.size() + tableOrigLength))
    202202                return false;
    203             Bytef* dest = reinterpret_cast<Bytef*>(getPtr(sfnt.end()));
     203            Bytef* dest = reinterpret_cast<Bytef*>(sfnt.end());
    204204            sfnt.grow(sfnt.size() + tableOrigLength);
    205205            if (uncompress(dest, &destLen, reinterpret_cast<const Bytef*>(woff->data() + tableOffset), tableCompLength) != Z_OK)
  • trunk/Source/WebCore/platform/graphics/cairo/GradientCairo.cpp

    r176592 r176709  
    6060        m_gradient = cairo_pattern_create_linear(m_p0.x(), m_p0.y(), m_p1.x(), m_p1.y());
    6161
    62     auto stopIterator = m_stops.begin();
     62    Vector<ColorStop>::iterator stopIterator = m_stops.begin();
    6363    while (stopIterator != m_stops.end()) {
    6464        cairo_pattern_add_color_stop_rgba(m_gradient, stopIterator->stop,
  • trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp

    r176592 r176709  
    146146    // this case.
    147147    clearBeforeFrame = std::min(clearBeforeFrame, m_frameBufferCache.size() - 1);
    148     const auto end = m_frameBufferCache.begin() + clearBeforeFrame;
     148    const Vector<ImageFrame>::iterator end(m_frameBufferCache.begin() + clearBeforeFrame);
    149149
    150150    // We need to preserve frames such that:
     
    166166    //     has a disposal method other than DisposeOverwritePrevious, stop
    167167    //     scanning, as we'll only need this frame when decoding the next one.
    168     auto i = end;
     168    Vector<ImageFrame>::iterator i(end);
    169169    for (; (i != m_frameBufferCache.begin()) && ((i->status() == ImageFrame::FrameEmpty) || (i->disposalMethod() == ImageFrame::DisposeOverwritePrevious)); --i) {
    170170        if ((i->status() == ImageFrame::FrameComplete) && (i != end))
     
    173173
    174174    // Now |i| holds the last frame we need to preserve; clear prior frames.
    175     for (auto j = m_frameBufferCache.begin(); j != i; ++j) {
     175    for (Vector<ImageFrame>::iterator j(m_frameBufferCache.begin()); j != i; ++j) {
    176176        ASSERT(j->status() != ImageFrame::FramePartial);
    177177        if (j->status() != ImageFrame::FrameEmpty)
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r176592 r176709  
    15781578    }
    15791579
    1580     auto topLayer = layers.rend();
    1581     for (auto it = layers.rbegin(); it != topLayer; ++it)
     1580    Vector<const FillLayer*>::const_reverse_iterator topLayer = layers.rend();
     1581    for (Vector<const FillLayer*>::const_reverse_iterator it = layers.rbegin(); it != topLayer; ++it)
    15821582        paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundObject, baseBgColorUsage);
    15831583
  • trunk/Source/WebCore/rendering/style/GridResolvedPosition.cpp

    r176592 r176709  
    296296    // the side).
    297297    unsigned firstLineBeforePositionIndex = 0;
    298     auto firstLineBeforePosition = std::lower_bound(gridLines.begin(), gridLines.end(), position);
     298    const unsigned* firstLineBeforePosition = std::lower_bound(gridLines.begin(), gridLines.end(), position);
    299299    if (firstLineBeforePosition != gridLines.end()) {
    300300        if (*firstLineBeforePosition > position && firstLineBeforePosition != gridLines.begin())
     
    317317std::unique_ptr<GridSpan> GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition(const GridResolvedPosition& resolvedOppositePosition, const GridPosition& position, const Vector<unsigned>& gridLines)
    318318{
     319    ASSERT(gridLines.size());
    319320    unsigned firstLineAfterOppositePositionIndex = gridLines.size() - 1;
    320     auto firstLineAfterOppositePosition = std::upper_bound(gridLines.begin(), gridLines.end(), resolvedOppositePosition);
     321    const unsigned* firstLineAfterOppositePosition = std::upper_bound(gridLines.begin(), gridLines.end(), resolvedOppositePosition);
    321322    if (firstLineAfterOppositePosition != gridLines.end())
    322323        firstLineAfterOppositePositionIndex = firstLineAfterOppositePosition - gridLines.begin();
  • trunk/Source/WebCore/svg/SVGFontElement.cpp

    r176592 r176709  
    253253    if (!g1.isEmpty() && kerningMap.glyphMap.contains(g1)) {
    254254        SVGKerningVector* kerningVector = kerningMap.glyphMap.get(g1);
    255         size_t it = kerningVector->size();
    256         while (it-- > 0) {
    257             auto& value = kerningVector->at(it);
    258             if (matches(u2, g2, value))
    259                 return value.kerning;
     255        SVGKerningVector::const_iterator it = kerningVector->end() - 1;
     256        const SVGKerningVector::const_iterator begin = kerningVector->begin() - 1;
     257        for (; it != begin; --it) {
     258            if (matches(u2, g2, *it))
     259                return it->kerning;
    260260        }
    261261    }
     
    264264        if (kerningMap.unicodeMap.contains(u1)) {
    265265            SVGKerningVector* kerningVector = kerningMap.unicodeMap.get(u1);
    266             size_t it = kerningVector->size();
    267             while (it-- > 0) {
    268                 auto& value = kerningVector->at(it);
    269                 if (matches(u2, g2, value))
    270                     return value.kerning;
     266            SVGKerningVector::const_iterator it = kerningVector->end() - 1;
     267            const SVGKerningVector::const_iterator begin = kerningVector->begin() - 1;
     268            for (; it != begin; --it) {
     269                if (matches(u2, g2, *it))
     270                    return it->kerning;
    271271            }
    272272        }
    273273
    274274        if (!kerningMap.kerningUnicodeRangeMap.isEmpty()) {
    275             size_t it = kerningMap.kerningUnicodeRangeMap.size();
    276             while (it-- > 0) {
    277                 auto& value = kerningMap.kerningUnicodeRangeMap[it];
    278                 if (matches(u1, u2, g2, value))
    279                     return value.kerning;
     275            Vector<SVGKerningPair>::const_iterator it = kerningMap.kerningUnicodeRangeMap.end() - 1;
     276            const Vector<SVGKerningPair>::const_iterator begin = kerningMap.kerningUnicodeRangeMap.begin() - 1;
     277            for (; it != begin; --it) {
     278                if (matches(u1, u2, g2, *it))
     279                    return it->kerning;
    280280            }
    281281        }
  • trunk/Source/WebCore/svg/SVGPathByteStream.h

    r176592 r176709  
    6161    void append(SVGPathByteStream* other)
    6262    {
    63         for (auto& byte : *other)
    64             append(byte);
     63        for (DataIterator it = other->begin(); it != other->end(); ++it)
     64            append(*it);
    6565    }
    6666    void clear() { m_data.clear(); }
  • trunk/Source/WebCore/xml/XPathNodeSet.h

    r176592 r176709  
    6565            bool subtreesAreDisjoint() const { return m_subtreesAreDisjoint || m_nodes.size() < 2; }
    6666
    67             const Vector<RefPtr<Node>>::iterator begin() const { return m_nodes.begin(); }
    68             const Vector<RefPtr<Node>>::iterator end() const { return m_nodes.end(); }
     67            const RefPtr<Node>* begin() const { return m_nodes.begin(); }
     68            const RefPtr<Node>* end() const { return m_nodes.end(); }
    6969
    7070        private:
Note: See TracChangeset for help on using the changeset viewer.