Title: [131659] trunk
Revision
131659
Author
[email protected]
Date
2012-10-17 15:51:10 -0700 (Wed, 17 Oct 2012)

Log Message

Clean up Vector.h
https://bugs.webkit.org/show_bug.cgi?id=99622

Reviewed by Benjamin Poulain.

Source/_javascript_Core:

Fix fallout from removing std::max and std::min using declarations.

* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::stringProtoFuncIndexOf):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):

Source/WebCore:

Fix fallout from removing std::max and std::min using declarations.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::currentAge):

Source/WTF:

Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
(as per the WebKit coding style guidelines).

* WTF.xcodeproj/project.pbxproj:
Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.

* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/StreamBuffer.h:
(WTF::StreamBuffer::append):
Add std:: prefixes to max and min.

* wtf/Vector.h:
Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.

Tools:

Remove ReversedProxy test.

* TestWebKitAPI/Tests/WTF/Vector.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (131658 => 131659)


--- trunk/Source/_javascript_Core/ChangeLog	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-10-17 22:51:10 UTC (rev 131659)
@@ -1,3 +1,19 @@
+2012-10-17  Anders Carlsson  <[email protected]>
+
+        Clean up Vector.h
+        https://bugs.webkit.org/show_bug.cgi?id=99622
+
+        Reviewed by Benjamin Poulain.
+
+        Fix fallout from removing std::max and std::min using declarations.
+
+        * runtime/StringPrototype.cpp:
+        (JSC::jsSpliceSubstrings):
+        (JSC::jsSpliceSubstringsWithSeparators):
+        (JSC::stringProtoFuncIndexOf):
+        * yarr/YarrPattern.cpp:
+        (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
+
 2012-10-17  Oliver Hunt  <[email protected]>
 
         Committing new files is so overrated.

Modified: trunk/Source/_javascript_Core/runtime/StringPrototype.cpp (131658 => 131659)


--- trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2012-10-17 22:51:10 UTC (rev 131659)
@@ -280,7 +280,7 @@
         if (position <= 0 && length >= sourceSize)
             return sourceVal;
         // We could call String::substringSharingImpl(), but this would result in redundant checks.
-        return jsString(exec, StringImpl::create(source.impl(), max(0, position), min(sourceSize, length)));
+        return jsString(exec, StringImpl::create(source.impl(), std::max(0, position), std::min(sourceSize, length)));
     }
 
     int totalLength = 0;
@@ -335,7 +335,7 @@
         if (position <= 0 && length >= sourceSize)
             return sourceVal;
         // We could call String::substringSharingImpl(), but this would result in redundant checks.
-        return jsString(exec, StringImpl::create(source.impl(), max(0, position), min(sourceSize, length)));
+        return jsString(exec, StringImpl::create(source.impl(), std::max(0, position), std::min(sourceSize, length)));
     }
 
     int totalLength = 0;
@@ -359,7 +359,7 @@
         if (!impl)
             return throwOutOfMemoryError(exec);
 
-        int maxCount = max(rangeCount, separatorCount);
+        int maxCount = std::max(rangeCount, separatorCount);
         int bufferPos = 0;
         for (int i = 0; i < maxCount; i++) {
             if (i < rangeCount) {
@@ -384,7 +384,7 @@
     if (!impl)
         return throwOutOfMemoryError(exec);
 
-    int maxCount = max(rangeCount, separatorCount);
+    int maxCount = std::max(rangeCount, separatorCount);
     int bufferPos = 0;
     for (int i = 0; i < maxCount; i++) {
         if (i < rangeCount) {
@@ -773,7 +773,7 @@
         unsigned pos;
         int len = s.length();
         if (a1.isUInt32())
-            pos = min<uint32_t>(a1.asUInt32(), len);
+            pos = std::min<uint32_t>(a1.asUInt32(), len);
         else {
             double dpos = a1.toInteger(exec);
             if (dpos < 0)

Modified: trunk/Source/_javascript_Core/yarr/YarrPattern.cpp (131658 => 131659)


--- trunk/Source/_javascript_Core/yarr/YarrPattern.cpp	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/_javascript_Core/yarr/YarrPattern.cpp	2012-10-17 22:51:10 UTC (rev 131659)
@@ -657,8 +657,8 @@
         for (unsigned alt = 0; alt < disjunction->m_alternatives.size(); ++alt) {
             PatternAlternative* alternative = disjunction->m_alternatives[alt];
             unsigned currentAlternativeCallFrameSize = setupAlternativeOffsets(alternative, initialCallFrameSize, initialInputPosition);
-            minimumInputSize = min(minimumInputSize, alternative->m_minimumSize);
-            maximumCallFrameSize = max(maximumCallFrameSize, currentAlternativeCallFrameSize);
+            minimumInputSize = std::min(minimumInputSize, alternative->m_minimumSize);
+            maximumCallFrameSize = std::max(maximumCallFrameSize, currentAlternativeCallFrameSize);
             hasFixedSize &= alternative->m_hasFixedSize;
         }
         

Modified: trunk/Source/WTF/ChangeLog (131658 => 131659)


--- trunk/Source/WTF/ChangeLog	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WTF/ChangeLog	2012-10-17 22:51:10 UTC (rev 131659)
@@ -1,3 +1,25 @@
+2012-10-17  Anders Carlsson  <[email protected]>
+
+        Clean up Vector.h
+        https://bugs.webkit.org/show_bug.cgi?id=99622
+
+        Reviewed by Benjamin Poulain.
+
+        Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
+        (as per the WebKit coding style guidelines).
+
+        * WTF.xcodeproj/project.pbxproj:
+        Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
+
+        * wtf/Deque.h:
+        (WTF::::expandCapacity):
+        * wtf/StreamBuffer.h:
+        (WTF::StreamBuffer::append):
+        Add std:: prefixes to max and min.
+
+        * wtf/Vector.h:
+        Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
+
 2012-10-17  Michael Saboff  <[email protected]>
 
         Creating a String from an NSString should check for all 8 bit strings

Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (131658 => 131659)


--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2012-10-17 22:51:10 UTC (rev 131659)
@@ -11,6 +11,7 @@
 		143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; };
 		143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		14F3B0F715E45E4600210069 /* SaturatedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		1A6BB769162F300500DD16DB /* StreamBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6BB768162F300500DD16DB /* StreamBuffer.h */; };
 		26147B0A15DDCCDC00DDB907 /* IntegerToStringConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 26147B0815DDCCDC00DDB907 /* IntegerToStringConversion.h */; };
 		2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2661122D160FEAD40013F5C3 /* URLQueryCharsetConverter.h */; };
 		26E6C1EE1609037300CA6AF4 /* URLCanonEtc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E6C1CE1609037300CA6AF4 /* URLCanonEtc.cpp */; };
@@ -68,7 +69,6 @@
 		A8A4738F151A825B004123FF /* BloomFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47265151A825A004123FF /* BloomFilter.h */; };
 		A8A47390151A825B004123FF /* BoundsCheckedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47266151A825A004123FF /* BoundsCheckedPointer.h */; };
 		A8A47391151A825B004123FF /* BumpPointerAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47267151A825A004123FF /* BumpPointerAllocator.h */; };
-		EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
 		A8A47394151A825B004123FF /* CheckedArithmetic.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4726A151A825A004123FF /* CheckedArithmetic.h */; };
 		A8A47395151A825B004123FF /* CheckedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4726B151A825A004123FF /* CheckedBoolean.h */; };
 		A8A47398151A825B004123FF /* Compiler.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A47270151A825A004123FF /* Compiler.h */; };
@@ -278,6 +278,7 @@
 		A8A4748C151A8264004123FF /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A4748B151A8264004123FF /* config.h */; };
 		CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5497AA15857D0300B5BC30 /* MediaTime.cpp */; };
 		CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5497AB15857D0300B5BC30 /* MediaTime.h */; };
+		EB95E1F0161A72410089A2F5 /* ByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = EB95E1EF161A72410089A2F5 /* ByteOrder.h */; };
 		F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = F3525E451619A4EE00278BC1 /* MemoryInstrumentationHashMap.h */; };
 		F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FBC71D161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h */; };
 		F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FBC71F161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h */; };
@@ -288,6 +289,7 @@
 		143F611D1565F0F900DB514A /* RAMSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RAMSize.cpp; sourceTree = "<group>"; };
 		143F611E1565F0F900DB514A /* RAMSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAMSize.h; sourceTree = "<group>"; };
 		14F3B0F615E45E4600210069 /* SaturatedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaturatedArithmetic.h; sourceTree = "<group>"; };
+		1A6BB768162F300500DD16DB /* StreamBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamBuffer.h; sourceTree = "<group>"; };
 		26147B0815DDCCDC00DDB907 /* IntegerToStringConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegerToStringConversion.h; sourceTree = "<group>"; };
 		2661122D160FEAD40013F5C3 /* URLQueryCharsetConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLQueryCharsetConverter.h; sourceTree = "<group>"; };
 		26E6C1CE1609037300CA6AF4 /* URLCanonEtc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLCanonEtc.cpp; sourceTree = "<group>"; };
@@ -351,7 +353,6 @@
 		A8A47265151A825A004123FF /* BloomFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloomFilter.h; sourceTree = "<group>"; };
 		A8A47266151A825A004123FF /* BoundsCheckedPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundsCheckedPointer.h; sourceTree = "<group>"; };
 		A8A47267151A825A004123FF /* BumpPointerAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BumpPointerAllocator.h; sourceTree = "<group>"; };
-		EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
 		A8A4726A151A825A004123FF /* CheckedArithmetic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedArithmetic.h; sourceTree = "<group>"; };
 		A8A4726B151A825A004123FF /* CheckedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedBoolean.h; sourceTree = "<group>"; };
 		A8A47270151A825A004123FF /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = "<group>"; };
@@ -564,6 +565,7 @@
 		A8A4748B151A8264004123FF /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
 		CD5497AA15857D0300B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaTime.cpp; sourceTree = "<group>"; };
 		CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
+		EB95E1EF161A72410089A2F5 /* ByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteOrder.h; sourceTree = "<group>"; };
 		F3525E451619A4EE00278BC1 /* MemoryInstrumentationHashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationHashMap.h; sourceTree = "<group>"; };
 		F3FBC71D161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationHashCountedSet.h; sourceTree = "<group>"; };
 		F3FBC71F161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentationSequence.h; sourceTree = "<group>"; };
@@ -778,6 +780,7 @@
 				A8A4730F151A825B004123FF /* StackBounds.h */,
 				A8A47310151A825B004123FF /* StaticConstructors.h */,
 				A8A47311151A825B004123FF /* StdLibExtras.h */,
+				1A6BB768162F300500DD16DB /* StreamBuffer.h */,
 				A8A47312151A825B004123FF /* StringExtras.cpp */,
 				A8A47313151A825B004123FF /* StringExtras.h */,
 				A8A47314151A825B004123FF /* StringHasher.h */,
@@ -1063,6 +1066,15 @@
 				A8A473E8151A825B004123FF /* MathExtras.h in Headers */,
 				A8A473EA151A825B004123FF /* MD5.h in Headers */,
 				CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */,
+				4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */,
+				4FD8554716133E0E00C5B704 /* MemoryInstrumentationArrayBufferView.h in Headers */,
+				F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */,
+				F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */,
+				4F1B2DB6160B44AA00586559 /* MemoryInstrumentationHashSet.h in Headers */,
+				4FD2A359161B0EE100EBF236 /* MemoryInstrumentationParsedURL.h in Headers */,
+				F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */,
+				4FCF27E116172E8600CBF037 /* MemoryInstrumentationString.h in Headers */,
+				4FCB710A160A1A07008425EC /* MemoryInstrumentationVector.h in Headers */,
 				A8A473EB151A825B004123FF /* MessageQueue.h in Headers */,
 				A8A473ED151A825B004123FF /* MetaAllocator.h in Headers */,
 				A8A473EE151A825B004123FF /* MetaAllocatorHandle.h in Headers */,
@@ -1114,6 +1126,7 @@
 				A8A47428151A825B004123FF /* StackBounds.h in Headers */,
 				A8A47429151A825B004123FF /* StaticConstructors.h in Headers */,
 				A8A4742A151A825B004123FF /* StdLibExtras.h in Headers */,
+				1A6BB769162F300500DD16DB /* StreamBuffer.h in Headers */,
 				A8A4743B151A825B004123FF /* StringBuffer.h in Headers */,
 				A8A4743D151A825B004123FF /* StringBuilder.h in Headers */,
 				A8A4743E151A825B004123FF /* StringConcatenate.h in Headers */,
@@ -1148,10 +1161,18 @@
 				A8A4746D151A825B004123FF /* UnionFind.h in Headers */,
 				A8A4746E151A825B004123FF /* UnusedParam.h in Headers */,
 				A8A47473151A825B004123FF /* URLBuffer.h in Headers */,
+				26E6C2011609037300CA6AF4 /* URLCanon.h in Headers */,
+				26E6C1F61609037300CA6AF4 /* URLCanonInternal.h in Headers */,
 				A8A47475151A825B004123FF /* URLCharacterTypes.h in Headers */,
 				A8A47476151A825B004123FF /* URLComponent.h in Headers */,
+				26E6C2031609037300CA6AF4 /* URLFile.h in Headers */,
+				26E6C2081609037300CA6AF4 /* URLParse.h in Headers */,
+				26E6C2051609037300CA6AF4 /* URLParseInternal.h in Headers */,
+				2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */,
 				A8A4747C151A825B004123FF /* URLSegments.h in Headers */,
 				A8A47471151A825B004123FF /* URLString.h in Headers */,
+				26E6C20D1609037300CA6AF4 /* URLUtil.h in Headers */,
+				26E6C20A1609037300CA6AF4 /* URLUtilInternal.h in Headers */,
 				A8A4746A151A825B004123FF /* UTF8.h in Headers */,
 				A8A473B9151A825B004123FF /* utils.h in Headers */,
 				A8A4747D151A825B004123FF /* ValueCheck.h in Headers */,
@@ -1160,23 +1181,6 @@
 				A8A47480151A825B004123FF /* VMTags.h in Headers */,
 				A8A47446151A825B004123FF /* WTFString.h in Headers */,
 				A8A47487151A825B004123FF /* WTFThreadData.h in Headers */,
-				4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */,
-				26E6C1F61609037300CA6AF4 /* URLCanonInternal.h in Headers */,
-				26E6C2011609037300CA6AF4 /* URLCanon.h in Headers */,
-				26E6C2031609037300CA6AF4 /* URLFile.h in Headers */,
-				26E6C2051609037300CA6AF4 /* URLParseInternal.h in Headers */,
-				26E6C2081609037300CA6AF4 /* URLParse.h in Headers */,
-				2661122E160FEAD40013F5C3 /* URLQueryCharsetConverter.h in Headers */,
-				26E6C20A1609037300CA6AF4 /* URLUtilInternal.h in Headers */,
-				26E6C20D1609037300CA6AF4 /* URLUtil.h in Headers */,
-				4FCB710A160A1A07008425EC /* MemoryInstrumentationVector.h in Headers */,
-				4F1B2DB6160B44AA00586559 /* MemoryInstrumentationHashSet.h in Headers */,
-				4FD8554716133E0E00C5B704 /* MemoryInstrumentationArrayBufferView.h in Headers */,
-				F3525E461619A4EE00278BC1 /* MemoryInstrumentationHashMap.h in Headers */,
-				4FCF27E116172E8600CBF037 /* MemoryInstrumentationString.h in Headers */,
-				4FD2A359161B0EE100EBF236 /* MemoryInstrumentationParsedURL.h in Headers */,
-				F3FBC71E161AF7BF00BB4BD4 /* MemoryInstrumentationHashCountedSet.h in Headers */,
-				F3FBC720161AF7CD00BB4BD4 /* MemoryInstrumentationSequence.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1294,8 +1298,8 @@
 				A8A473D8151A825B004123FF /* HashTable.cpp in Sources */,
 				A8A473E5151A825B004123FF /* MainThread.cpp in Sources */,
 				A8A473E4151A825B004123FF /* MainThreadMac.mm in Sources */,
+				A8A473E9151A825B004123FF /* MD5.cpp in Sources */,
 				CD5497AC15857D0300B5BC30 /* MediaTime.cpp in Sources */,
-				A8A473E9151A825B004123FF /* MD5.cpp in Sources */,
 				A8A473EC151A825B004123FF /* MetaAllocator.cpp in Sources */,
 				A8A473F2151A825B004123FF /* NullPtr.cpp in Sources */,
 				A8A473F4151A825B004123FF /* NumberOfCores.cpp in Sources */,
@@ -1334,8 +1338,8 @@
 				26E6C1FD1609037300CA6AF4 /* URLCanonRelative.cpp in Sources */,
 				26E6C1FF1609037300CA6AF4 /* URLCanonStdURL.cpp in Sources */,
 				A8A47474151A825B004123FF /* URLCharacterTypes.cpp in Sources */,
+				26E6C2071609037300CA6AF4 /* URLParse.cpp in Sources */,
 				26E6C2041609037300CA6AF4 /* URLParseFile.cpp in Sources */,
-				26E6C2071609037300CA6AF4 /* URLParse.cpp in Sources */,
 				A8A4747B151A825B004123FF /* URLSegments.cpp in Sources */,
 				4330F38F15745B0500AAFA8F /* URLString.cpp in Sources */,
 				26E6C20C1609037300CA6AF4 /* URLUtil.cpp in Sources */,

Modified: trunk/Source/WTF/wtf/Deque.h (131658 => 131659)


--- trunk/Source/WTF/wtf/Deque.h	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WTF/wtf/Deque.h	2012-10-17 22:51:10 UTC (rev 131659)
@@ -426,7 +426,7 @@
     {
         checkValidity();
         size_t oldCapacity = m_buffer.capacity();
-        size_t newCapacity = max(static_cast<size_t>(16), oldCapacity + oldCapacity / 4 + 1);
+        size_t newCapacity = std::max(static_cast<size_t>(16), oldCapacity + oldCapacity / 4 + 1);
         T* oldBuffer = m_buffer.buffer();
         m_buffer.allocateBuffer(newCapacity);
         if (m_start <= m_end)

Modified: trunk/Source/WTF/wtf/StreamBuffer.h (131658 => 131659)


--- trunk/Source/WTF/wtf/StreamBuffer.h	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WTF/wtf/StreamBuffer.h	2012-10-17 22:51:10 UTC (rev 131659)
@@ -63,7 +63,7 @@
         while (size) {
             if (!m_buffer.size() || m_buffer.last()->size() == BlockSize)
                 m_buffer.append(adoptPtr(new Block));
-            size_t appendSize = min(BlockSize - m_buffer.last()->size(), size);
+            size_t appendSize = std::min(BlockSize - m_buffer.last()->size(), size);
             m_buffer.last()->append(data, appendSize);
             data += appendSize;
             size -= appendSize;

Modified: trunk/Source/WTF/wtf/Vector.h (131658 => 131659)


--- trunk/Source/WTF/wtf/Vector.h	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WTF/wtf/Vector.h	2012-10-17 22:51:10 UTC (rev 131659)
@@ -34,9 +34,6 @@
 
 namespace WTF {
 
-    using std::min;
-    using std::max;
-
     template <bool needsDestruction, typename T>
     struct VectorDestructor;
 
@@ -305,7 +302,6 @@
 
         T* buffer() { return m_buffer; }
         const T* buffer() const { return m_buffer; }
-        T** bufferSlot() { return &m_buffer; }
         size_t capacity() const { return m_capacity; }
 
         T* releaseBuffer()
@@ -378,7 +374,6 @@
         using Base::deallocateBuffer;
 
         using Base::buffer;
-        using Base::bufferSlot;
         using Base::capacity;
 
         using Base::releaseBuffer;
@@ -479,7 +474,6 @@
         }
 
         using Base::buffer;
-        using Base::bufferSlot;
         using Base::capacity;
 
         T* releaseBuffer()
@@ -507,8 +501,6 @@
         typedef VectorBuffer<T, inlineCapacity> Buffer;
         typedef VectorTypeOperations<T> TypeOperations;
 
-        class VectorReverseProxy;
-
     public:
         typedef T ValueType;
 
@@ -581,9 +573,6 @@
         const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
         const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
 
-        VectorReverseProxy& reversed() { return static_cast<VectorReverseProxy&>(*this); }
-        const VectorReverseProxy& reversed() const { return static_cast<const VectorReverseProxy&>(*this); }
-
         T& first() { return at(0); }
         const T& first() const { return at(0); }
         T& last() { return at(size() - 1); }
@@ -661,26 +650,6 @@
         template<typename U> U* expandCapacity(size_t newMinCapacity, U*); 
         template<typename U> void appendSlowCase(const U&);
 
-        class VectorReverseProxy : private Vector {
-        public:
-            typedef typename Vector::reverse_iterator iterator;
-            typedef typename Vector::const_reverse_iterator const_iterator;
-            
-            iterator begin() { return Vector::rbegin(); }
-            iterator end() { return Vector::rend(); }
-            const_iterator begin() const { return Vector::rbegin(); }
-            const_iterator end() const { return Vector::rend(); }
-
-        private:
-            friend class Vector;
-
-            // These are intentionally not implemented.
-            VectorReverseProxy();
-            VectorReverseProxy(const VectorReverseProxy&);
-            VectorReverseProxy& operator=(const VectorReverseProxy&);
-            ~VectorReverseProxy();
-        };
-
         size_t m_size;
         Buffer m_buffer;
     };
@@ -841,7 +810,7 @@
     template<typename T, size_t inlineCapacity>
     void Vector<T, inlineCapacity>::expandCapacity(size_t newMinCapacity)
     {
-        reserveCapacity(max(newMinCapacity, max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
+        reserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
     }
     
     template<typename T, size_t inlineCapacity>
@@ -859,7 +828,7 @@
     template<typename T, size_t inlineCapacity>
     bool Vector<T, inlineCapacity>::tryExpandCapacity(size_t newMinCapacity)
     {
-        return tryReserveCapacity(max(newMinCapacity, max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
+        return tryReserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1)));
     }
     
     template<typename T, size_t inlineCapacity>

Modified: trunk/Source/WebCore/ChangeLog (131658 => 131659)


--- trunk/Source/WebCore/ChangeLog	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WebCore/ChangeLog	2012-10-17 22:51:10 UTC (rev 131659)
@@ -1,3 +1,15 @@
+2012-10-17  Anders Carlsson  <[email protected]>
+
+        Clean up Vector.h
+        https://bugs.webkit.org/show_bug.cgi?id=99622
+
+        Reviewed by Benjamin Poulain.
+
+        Fix fallout from removing std::max and std::min using declarations.
+
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::currentAge):
+
 2012-10-17  Joshua Bell  <[email protected]>
 
         IndexedDB: Enforce unsigned long/unsigned long long ranges

Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (131658 => 131659)


--- trunk/Source/WebCore/loader/cache/CachedResource.cpp	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp	2012-10-17 22:51:10 UTC (rev 131659)
@@ -293,9 +293,9 @@
     // RFC2616 13.2.3
     // No compensation for latency as that is not terribly important in practice
     double dateValue = m_response.date();
-    double apparentAge = isfinite(dateValue) ? max(0., m_responseTimestamp - dateValue) : 0;
+    double apparentAge = isfinite(dateValue) ? std::max(0., m_responseTimestamp - dateValue) : 0;
     double ageValue = m_response.age();
-    double correctedReceivedAge = isfinite(ageValue) ? max(apparentAge, ageValue) : apparentAge;
+    double correctedReceivedAge = isfinite(ageValue) ? std::max(apparentAge, ageValue) : apparentAge;
     double residentTime = currentTime() - m_responseTimestamp;
     return correctedReceivedAge + residentTime;
 }

Modified: trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp (131658 => 131659)


--- trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp	2012-10-17 22:51:10 UTC (rev 131659)
@@ -173,8 +173,9 @@
     row.resize(cinfo.image_width * cinfo.input_components);
     const size_t pixelRowStride = cinfo.image_width * 4;
     while (cinfo.next_scanline < cinfo.image_height) {
-        extractRowRGB(pixels, cinfo.image_width, row.data());
-        jpeg_write_scanlines(&cinfo, row.dataSlot(), 1);
+        JSAMPLE* rowData = row.data();
+        extractRowRGB(pixels, cinfo.image_width, rowData);
+        jpeg_write_scanlines(&cinfo, &rowData, 1);
         pixels += pixelRowStride;
     }
 

Modified: trunk/Tools/ChangeLog (131658 => 131659)


--- trunk/Tools/ChangeLog	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Tools/ChangeLog	2012-10-17 22:51:10 UTC (rev 131659)
@@ -1,3 +1,14 @@
+2012-10-17  Anders Carlsson  <[email protected]>
+
+        Clean up Vector.h
+        https://bugs.webkit.org/show_bug.cgi?id=99622
+
+        Reviewed by Benjamin Poulain.
+
+        Remove ReversedProxy test.
+
+        * TestWebKitAPI/Tests/WTF/Vector.cpp:
+
 2012-10-17  Scott Graham  <[email protected]>
 
         Integer overflows/underflows in all Gamepad controller api calls.

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp (131658 => 131659)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp	2012-10-17 22:48:44 UTC (rev 131658)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp	2012-10-17 22:51:10 UTC (rev 131659)
@@ -76,29 +76,4 @@
     EXPECT_TRUE(end == it);
 }
 
-TEST(WTF_Vector, ReversedProxy)
-{
-    Vector<int> intVector;
-    intVector.append(10);
-    intVector.append(11);
-    intVector.append(12);
-    intVector.append(13);
-    
-    Vector<int>::reverse_iterator it = intVector.reversed().begin();
-    Vector<int>::reverse_iterator end = intVector.reversed().end();
-    
-    EXPECT_TRUE(end != it);
-
-    EXPECT_EQ(13, *it);
-    ++it;
-    EXPECT_EQ(12, *it);
-    ++it;
-    EXPECT_EQ(11, *it);
-    ++it;
-    EXPECT_EQ(10, *it);
-    ++it;
-
-    EXPECT_TRUE(end == it);
-}
-
 } // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to