Changeset 176709 in webkit
- Timestamp:
- Dec 2, 2014 8:14:49 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 deleted
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r176700 r176709 1 2014-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 1 29 2014-12-02 Michael Saboff <msaboff@apple.com> 2 30 -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
r176592 r176709 235 235 visitor.append(&thisObject->m_symbolTable); 236 236 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); 238 238 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); 240 240 visitor.appendValues(thisObject->m_constantRegisters.data(), thisObject->m_constantRegisters.size()); 241 241 if (thisObject->m_rareData) { -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r176592 r176709 2272 2272 int bottomScopeIndex = -1; 2273 2273 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(); 2276 2276 savedScopeContextStack = m_scopeContextStack; 2277 2277 m_scopeContextStack.shrink(finallyContext.scopeContextStackSize); … … 2317 2317 m_scopeContextStack = savedScopeContextStack; 2318 2318 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. 2320 2320 } 2321 2321 if (flipSwitches) -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r176592 r176709 4911 4911 m_jit.branch32(JITCompiler::AboveOrEqual, value, Imm32(table.ctiOffsets.size())), 4912 4912 data->fallThrough.block); 4913 m_jit.move(TrustedImmPtr(table.ctiOffsets. data()), scratch);4913 m_jit.move(TrustedImmPtr(table.ctiOffsets.begin()), scratch); 4914 4914 m_jit.loadPtr(JITCompiler::BaseIndex(scratch, value, JITCompiler::timesPtr()), scratch); 4915 4915 m_jit.jump(scratch); -
trunk/Source/JavaScriptCore/ftl/FTLAbbreviations.h
r176592 r176709 121 121 static inline LValue mdNode(LContext context, LValue* args, unsigned numArgs) { return llvm->MDNodeInContext(context, args, numArgs); } 122 122 template<typename VectorType> 123 static inline LValue mdNode(LContext context, const VectorType& vector) { return mdNode(context, const_cast<LValue*>(vector. data()), vector.size()); }123 static inline LValue mdNode(LContext context, const VectorType& vector) { return mdNode(context, const_cast<LValue*>(vector.begin()), vector.size()); } 124 124 static inline LValue mdNode(LContext context) { return mdNode(context, 0, 0); } 125 125 static inline LValue mdNode(LContext context, LValue arg1) { return mdNode(context, &arg1, 1); } … … 289 289 inline LValue buildCall(LBuilder builder, LValue function, const VectorType& vector) 290 290 { 291 return buildCall(builder, function, vector. data(), vector.size());291 return buildCall(builder, function, vector.begin(), vector.size()); 292 292 } 293 293 static inline LValue buildCall(LBuilder builder, LValue function) -
trunk/Source/JavaScriptCore/llint/LLIntData.cpp
r176592 r176709 162 162 testVector.resize(42); 163 163 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()); 165 165 #endif 166 166 -
trunk/Source/JavaScriptCore/parser/Parser.h
r176592 r176709 131 131 if (rhs.m_labels) { 132 132 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)); 135 138 } 136 139 } -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r176592 r176709 353 353 // delete values in any order. 354 354 if (map->sparseMode()) { 355 qsort(keys. data(), keys.size(), sizeof(unsigned), compareKeysForQSort);355 qsort(keys.begin(), keys.size(), sizeof(unsigned), compareKeysForQSort); 356 356 unsigned i = keys.size(); 357 357 while (i) { … … 1192 1192 #if HAVE(MERGESORT) 1193 1193 if (isSortingPrimitiveValues) 1194 qsort(values. data(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);1194 qsort(values.begin(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort); 1195 1195 else 1196 mergesort(values. data(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort);1196 mergesort(values.begin(), values.size(), sizeof(ValueStringPair), compareByStringPairForQSort); 1197 1197 #else 1198 1198 // FIXME: The qsort library function is likely to not be a stable sort. 1199 1199 // 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); 1201 1201 #endif 1202 1202 -
trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h
r176592 r176709 87 87 for (Map::iterator it = m_children->begin(); it != m_children->end(); ++it) 88 88 entries.append(&*it); 89 qsort(entries. data(), entries.size(), sizeof(MapEntry*), compareEntries);89 qsort(entries.begin(), entries.size(), sizeof(MapEntry*), compareEntries); 90 90 91 91 // Iterate over the children in sample-frequency order. -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r176592 r176709 224 224 unsigned matchIndex = 0; 225 225 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()); 227 227 while (matchIndex < charClass->m_matches.size()) 228 228 matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++]))); -
trunk/Source/WTF/ChangeLog
r176705 r176709 1 2014-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 1 38 2014-12-02 Oliver Hunt <oliver@apple.com> 2 39 -
trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj
r176683 r176709 220 220 <ClInclude Include="..\wtf\HashTraits.h" /> 221 221 <ClInclude Include="..\wtf\HexNumber.h" /> 222 <ClInclude Include="..\wtf\IndexedIterator.h" />223 222 <ClInclude Include="..\wtf\IteratorAdaptors.h" /> 224 223 <ClInclude Include="..\wtf\IteratorRange.h" /> -
trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters
r176592 r176709 466 466 </ClInclude> 467 467 <ClInclude Include="..\wtf\HexNumber.h"> 468 <Filter>wtf</Filter>469 </ClInclude>470 <ClInclude Include="..\wtf\IndexedIterator.h">471 468 <Filter>wtf</Filter> 472 469 </ClInclude> -
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
r176683 r176709 101 101 A748745317A0BDAE00FA04CB /* SixCharacterHash.h in Headers */ = {isa = PBXBuildFile; fileRef = A748745017A0BDAE00FA04CB /* SixCharacterHash.h */; }; 102 102 A748745417A0BDAE00FA04CB /* StringHashDumpContext.h in Headers */ = {isa = PBXBuildFile; fileRef = A748745117A0BDAE00FA04CB /* StringHashDumpContext.h */; }; 103 A7DC2F041A09A22D0072F4E3 /* IndexedIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A7DC2F031A099DE30072F4E3 /* IndexedIterator.h */; };104 103 A7E643C617C5423B003BB16B /* Compression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E643C417C5423B003BB16B /* Compression.cpp */; }; 105 104 A7E643C717C5423B003BB16B /* Compression.h in Headers */ = {isa = PBXBuildFile; fileRef = A7E643C517C5423B003BB16B /* Compression.h */; }; … … 395 394 A748745017A0BDAE00FA04CB /* SixCharacterHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SixCharacterHash.h; sourceTree = "<group>"; }; 396 395 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>"; };398 396 A7E643C417C5423B003BB16B /* Compression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Compression.cpp; sourceTree = "<group>"; }; 399 397 A7E643C517C5423B003BB16B /* Compression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compression.h; sourceTree = "<group>"; }; … … 901 899 A8A4737A151A825B004123FF /* WTFThreadData.cpp */, 902 900 A8A4737B151A825B004123FF /* WTFThreadData.h */, 903 A7DC2F031A099DE30072F4E3 /* IndexedIterator.h */,904 901 ); 905 902 path = wtf; … … 1075 1072 A8A4745E151A825B004123FF /* CharacterNames.h in Headers */, 1076 1073 A8A47394151A825B004123FF /* CheckedArithmetic.h in Headers */, 1077 A7DC2F041A09A22D0072F4E3 /* IndexedIterator.h in Headers */,1078 1074 A8A47395151A825B004123FF /* CheckedBoolean.h in Headers */, 1079 1075 A8A4745F151A825B004123FF /* Collator.h in Headers */, -
trunk/Source/WTF/wtf/RefCountedArray.h
r176592 r176709 84 84 Header::fromPayload(m_data)->length = other.size(); 85 85 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); 87 87 } 88 88 -
trunk/Source/WTF/wtf/Vector.h
r176592 r176709 29 29 #include <wtf/CheckedArithmetic.h> 30 30 #include <wtf/FastMalloc.h> 31 #include <wtf/GetPtr.h>32 #include <wtf/IndexedIterator.h>33 31 #include <wtf/MallocPtr.h> 34 32 #include <wtf/Noncopyable.h> … … 557 555 WTF_MAKE_FAST_ALLOCATED; 558 556 private: 559 560 557 typedef VectorBuffer<T, inlineCapacity> Base; 561 558 typedef VectorTypeOperations<T> TypeOperations; 562 typedef IndexedIteratorSelector<Vector, OverflowHandler> IteratorSelector;563 559 564 560 public: 565 561 typedef T ValueType; 566 562 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; 570 565 typedef std::reverse_iterator<iterator> reverse_iterator; 571 566 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; … … 580 575 { 581 576 if (begin()) 582 TypeOperations::initialize( getPtr(begin()), getPtr(end()));577 TypeOperations::initialize(begin(), end()); 583 578 } 584 579 … … 587 582 { 588 583 if (begin()) 589 TypeOperations::uninitializedFill( getPtr(begin()), getPtr(end()), val);584 TypeOperations::uninitializedFill(begin(), end(), val); 590 585 } 591 586 … … 651 646 static ptrdiff_t dataMemoryOffset() { return Base::bufferMemoryOffset(); } 652 647 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; } 657 652 658 653 reverse_iterator rbegin() { return reverse_iterator(end()); } … … 689 684 void clear() { shrinkCapacity(0); } 690 685 691 void append(const_iterator, unsigned);692 686 template<typename U> void append(const U*, unsigned); 693 687 template<typename U> void append(U&&); … … 753 747 { 754 748 if (begin()) 755 TypeOperations::uninitializedCopy( getPtr(other.begin()), getPtr(other.end()), getPtr(begin()));749 TypeOperations::uninitializedCopy(other.begin(), other.end(), begin()); 756 750 } 757 751 … … 762 756 { 763 757 if (begin()) 764 TypeOperations::uninitializedCopy( getPtr(other.begin()), getPtr(other.end()), getPtr(begin()));758 TypeOperations::uninitializedCopy(other.begin(), other.end(), begin()); 765 759 } 766 760 … … 779 773 } 780 774 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()); 783 777 m_size = other.size(); 784 778 … … 804 798 ASSERT(begin()); 805 799 } 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()); 809 803 m_size = other.size(); 810 804 … … 866 860 } 867 861 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); 870 864 m_size = newSize; 871 865 } … … 888 882 T* Vector<T, inlineCapacity, OverflowHandler>::expandCapacity(unsigned newMinCapacity, T* ptr) 889 883 { 890 if (ptr < getPtr(begin()) || ptr >= getPtr(end())) {884 if (ptr < begin() || ptr >= end()) { 891 885 expandCapacity(newMinCapacity); 892 886 return ptr; 893 887 } 894 unsigned index = ptr - getPtr(begin());888 unsigned index = ptr - begin(); 895 889 expandCapacity(newMinCapacity); 896 return getPtr(begin()) + index;890 return begin() + index; 897 891 } 898 892 … … 906 900 const T* Vector<T, inlineCapacity, OverflowHandler>::tryExpandCapacity(unsigned newMinCapacity, const T* ptr) 907 901 { 908 if (ptr < getPtr(begin()) || ptr >= getPtr(end())) {902 if (ptr < begin() || ptr >= end()) { 909 903 if (!tryExpandCapacity(newMinCapacity)) 910 904 return 0; 911 905 return ptr; 912 906 } 913 unsigned index = ptr - getPtr(begin());907 unsigned index = ptr - begin(); 914 908 if (!tryExpandCapacity(newMinCapacity)) 915 909 return 0; 916 return getPtr(begin()) + index;910 return begin() + index; 917 911 } 918 912 … … 928 922 { 929 923 if (size <= m_size) 930 TypeOperations::destruct( getPtr(begin()) + size, getPtr(end()));924 TypeOperations::destruct(begin() + size, end()); 931 925 else { 932 926 if (size > capacity()) 933 927 expandCapacity(size); 934 928 if (begin()) 935 TypeOperations::initialize( getPtr(end()), getPtr(begin()) + size);929 TypeOperations::initialize(end(), begin() + size); 936 930 } 937 931 … … 950 944 { 951 945 ASSERT(size <= m_size); 952 TypeOperations::destruct( getPtr(begin()) + size, getPtr(end()));946 TypeOperations::destruct(begin() + size, end()); 953 947 m_size = size; 954 948 } … … 961 955 expandCapacity(size); 962 956 if (begin()) 963 TypeOperations::initialize( getPtr(end()), getPtr(begin()) + size);957 TypeOperations::initialize(end(), begin() + size); 964 958 m_size = size; 965 959 } … … 970 964 if (newCapacity <= capacity()) 971 965 return; 972 T* oldBuffer = getPtr(begin());973 T* oldEnd = getPtr(end());966 T* oldBuffer = begin(); 967 T* oldEnd = end(); 974 968 Base::allocateBuffer(newCapacity); 975 969 ASSERT(begin()); 976 TypeOperations::move(oldBuffer, oldEnd, getPtr(begin()));970 TypeOperations::move(oldBuffer, oldEnd, begin()); 977 971 Base::deallocateBuffer(oldBuffer); 978 972 } … … 983 977 if (newCapacity <= capacity()) 984 978 return true; 985 T* oldBuffer = getPtr(begin());986 T* oldEnd = getPtr(end());979 T* oldBuffer = begin(); 980 T* oldEnd = end(); 987 981 if (!Base::tryAllocateBuffer(newCapacity)) 988 982 return false; 989 983 ASSERT(begin()); 990 TypeOperations::move(oldBuffer, oldEnd, getPtr(begin()));984 TypeOperations::move(oldBuffer, oldEnd, begin()); 991 985 Base::deallocateBuffer(oldBuffer); 992 986 return true; … … 1011 1005 shrink(newCapacity); 1012 1006 1013 T* oldBuffer = getPtr(begin());1007 T* oldBuffer = begin(); 1014 1008 if (newCapacity > 0) { 1015 1009 if (Base::shouldReallocateBuffer(newCapacity)) { … … 1018 1012 } 1019 1013 1020 T* oldEnd = getPtr(end());1014 T* oldEnd = end(); 1021 1015 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()); 1024 1018 } 1025 1019 … … 1041 1035 if (newSize < m_size) 1042 1036 CRASH(); 1043 T* dest = getPtr(end());1037 T* dest = end(); 1044 1038 VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], dest); 1045 1039 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);1052 1040 } 1053 1041 … … 1064 1052 if (newSize < m_size) 1065 1053 return false; 1066 T* dest = getPtr(end());1054 T* dest = end(); 1067 1055 VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], dest); 1068 1056 m_size = newSize; … … 1074 1062 { 1075 1063 if (size() != capacity()) { 1076 new (NotNull, getPtr(end())) T(std::forward<U>(value));1064 new (NotNull, end()) T(std::forward<U>(value)); 1077 1065 ++m_size; 1078 1066 return; … … 1091 1079 ASSERT(begin()); 1092 1080 1093 new (NotNull, getPtr(end())) T(std::forward<U>(*ptr));1081 new (NotNull, end()) T(std::forward<U>(*ptr)); 1094 1082 ++m_size; 1095 1083 } … … 1104 1092 1105 1093 auto ptr = std::addressof(value); 1106 new (NotNull, getPtr(end())) T(std::forward<U>(*ptr));1094 new (NotNull, end()) T(std::forward<U>(*ptr)); 1107 1095 ++m_size; 1108 1096 } … … 1111 1099 inline void Vector<T, inlineCapacity, OverflowHandler>::appendVector(const Vector<U, otherCapacity>& val) 1112 1100 { 1113 append( getPtr(val.begin()), val.size());1101 append(val.begin(), val.size()); 1114 1102 } 1115 1103 … … 1125 1113 if (newSize < m_size) 1126 1114 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); 1129 1117 VectorCopier<std::is_trivial<T>::value, U>::uninitializedCopy(data, &data[dataSize], spot); 1130 1118 m_size = newSize; … … 1142 1130 } 1143 1131 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); 1146 1134 new (NotNull, spot) T(std::forward<U>(*ptr)); 1147 1135 ++m_size; … … 1151 1139 inline void Vector<T, inlineCapacity, OverflowHandler>::insertVector(unsigned position, const Vector<U, c>& val) 1152 1140 { 1153 insert(position, getPtr(val.begin()), val.size());1141 insert(position, val.begin(), val.size()); 1154 1142 } 1155 1143 … … 1158 1146 { 1159 1147 ASSERT_WITH_SECURITY_IMPLICATION(position < size()); 1160 T* spot = getPtr(begin()) + position;1148 T* spot = begin() + position; 1161 1149 spot->~T(); 1162 TypeOperations::moveOverlapping(spot + 1, getPtr(end()), spot);1150 TypeOperations::moveOverlapping(spot + 1, end(), spot); 1163 1151 --m_size; 1164 1152 } … … 1169 1157 ASSERT_WITH_SECURITY_IMPLICATION(position <= size()); 1170 1158 ASSERT_WITH_SECURITY_IMPLICATION(position + length <= size()); 1171 T* beginSpot = getPtr(begin()) + position;1159 T* beginSpot = begin() + position; 1172 1160 T* endSpot = beginSpot + length; 1173 1161 TypeOperations::destruct(beginSpot, endSpot); 1174 TypeOperations::moveOverlapping(endSpot, getPtr(end()), beginSpot);1162 TypeOperations::moveOverlapping(endSpot, end(), beginSpot); 1175 1163 m_size -= length; 1176 1164 } -
trunk/Source/WebCore/ChangeLog
r176708 r176709 1 2014-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 1 37 2014-12-02 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 38 -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r176592 r176709 1438 1438 if (buffer.isEmpty()) 1439 1439 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(); 1442 1442 uint32_t version; 1443 1443 if (!readLittleEndian(ptr, end, version) || version > CurrentVersion) -
trunk/Source/WebCore/editing/TextIterator.cpp
r176592 r176709 2074 2074 normalizeCharacters(match, matchLength, m_normalizedMatch); 2075 2075 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(); 2081 2081 2082 2082 while (true) { -
trunk/Source/WebCore/page/mac/ServicesOverlayController.mm
r176682 r176709 543 543 if (!cgRects.isEmpty()) { 544 544 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)); 546 546 547 547 newPotentialHighlights.add(Highlight::createForSelection(*this, ddHighlight, selectionRange)); -
trunk/Source/WebCore/platform/graphics/SegmentedFontData.cpp
r176592 r176709 40 40 const SimpleFontData* SegmentedFontData::fontDataForCharacter(UChar32 c) const 41 41 { 42 autoend = m_ranges.end();43 for ( autoit = 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) { 44 44 if (it->from() <= c && it->to() >= c) 45 45 return it->fontData().get(); … … 50 50 bool SegmentedFontData::containsCharacter(UChar32 c) const 51 51 { 52 autoend = m_ranges.end();53 for ( autoit = 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) { 54 54 if (c >= it->from() && c <= it->to()) 55 55 return true; … … 77 77 bool SegmentedFontData::isLoading() const 78 78 { 79 autoend = m_ranges.end();80 for ( autoit = 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) { 81 81 if (it->fontData()->isLoading()) 82 82 return true; -
trunk/Source/WebCore/platform/graphics/WOFFFileFormat.cpp
r176592 r176709 201 201 if (!sfnt.tryReserveCapacity(sfnt.size() + tableOrigLength)) 202 202 return false; 203 Bytef* dest = reinterpret_cast<Bytef*>( getPtr(sfnt.end()));203 Bytef* dest = reinterpret_cast<Bytef*>(sfnt.end()); 204 204 sfnt.grow(sfnt.size() + tableOrigLength); 205 205 if (uncompress(dest, &destLen, reinterpret_cast<const Bytef*>(woff->data() + tableOffset), tableCompLength) != Z_OK) -
trunk/Source/WebCore/platform/graphics/cairo/GradientCairo.cpp
r176592 r176709 60 60 m_gradient = cairo_pattern_create_linear(m_p0.x(), m_p0.y(), m_p1.x(), m_p1.y()); 61 61 62 autostopIterator = m_stops.begin();62 Vector<ColorStop>::iterator stopIterator = m_stops.begin(); 63 63 while (stopIterator != m_stops.end()) { 64 64 cairo_pattern_add_color_stop_rgba(m_gradient, stopIterator->stop, -
trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
r176592 r176709 146 146 // this case. 147 147 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); 149 149 150 150 // We need to preserve frames such that: … … 166 166 // has a disposal method other than DisposeOverwritePrevious, stop 167 167 // scanning, as we'll only need this frame when decoding the next one. 168 auto i = end;168 Vector<ImageFrame>::iterator i(end); 169 169 for (; (i != m_frameBufferCache.begin()) && ((i->status() == ImageFrame::FrameEmpty) || (i->disposalMethod() == ImageFrame::DisposeOverwritePrevious)); --i) { 170 170 if ((i->status() == ImageFrame::FrameComplete) && (i != end)) … … 173 173 174 174 // 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) { 176 176 ASSERT(j->status() != ImageFrame::FramePartial); 177 177 if (j->status() != ImageFrame::FrameEmpty) -
trunk/Source/WebCore/rendering/RenderBox.cpp
r176592 r176709 1578 1578 } 1579 1579 1580 autotopLayer = layers.rend();1581 for ( autoit = 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) 1582 1582 paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundObject, baseBgColorUsage); 1583 1583 -
trunk/Source/WebCore/rendering/style/GridResolvedPosition.cpp
r176592 r176709 296 296 // the side). 297 297 unsigned firstLineBeforePositionIndex = 0; 298 autofirstLineBeforePosition = std::lower_bound(gridLines.begin(), gridLines.end(), position);298 const unsigned* firstLineBeforePosition = std::lower_bound(gridLines.begin(), gridLines.end(), position); 299 299 if (firstLineBeforePosition != gridLines.end()) { 300 300 if (*firstLineBeforePosition > position && firstLineBeforePosition != gridLines.begin()) … … 317 317 std::unique_ptr<GridSpan> GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition(const GridResolvedPosition& resolvedOppositePosition, const GridPosition& position, const Vector<unsigned>& gridLines) 318 318 { 319 ASSERT(gridLines.size()); 319 320 unsigned firstLineAfterOppositePositionIndex = gridLines.size() - 1; 320 autofirstLineAfterOppositePosition = std::upper_bound(gridLines.begin(), gridLines.end(), resolvedOppositePosition);321 const unsigned* firstLineAfterOppositePosition = std::upper_bound(gridLines.begin(), gridLines.end(), resolvedOppositePosition); 321 322 if (firstLineAfterOppositePosition != gridLines.end()) 322 323 firstLineAfterOppositePositionIndex = firstLineAfterOppositePosition - gridLines.begin(); -
trunk/Source/WebCore/svg/SVGFontElement.cpp
r176592 r176709 253 253 if (!g1.isEmpty() && kerningMap.glyphMap.contains(g1)) { 254 254 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; 260 260 } 261 261 } … … 264 264 if (kerningMap.unicodeMap.contains(u1)) { 265 265 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; 271 271 } 272 272 } 273 273 274 274 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; 280 280 } 281 281 } -
trunk/Source/WebCore/svg/SVGPathByteStream.h
r176592 r176709 61 61 void append(SVGPathByteStream* other) 62 62 { 63 for ( auto& byte : *other)64 append( byte);63 for (DataIterator it = other->begin(); it != other->end(); ++it) 64 append(*it); 65 65 } 66 66 void clear() { m_data.clear(); } -
trunk/Source/WebCore/xml/XPathNodeSet.h
r176592 r176709 65 65 bool subtreesAreDisjoint() const { return m_subtreesAreDisjoint || m_nodes.size() < 2; } 66 66 67 const Vector<RefPtr<Node>>::iteratorbegin() const { return m_nodes.begin(); }68 const Vector<RefPtr<Node>>::iteratorend() 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(); } 69 69 70 70 private:
Note: See TracChangeset
for help on using the changeset viewer.