Title: [208815] trunk
Revision
208815
Author
[email protected]
Date
2016-11-16 14:53:48 -0800 (Wed, 16 Nov 2016)

Log Message

REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
https://bugs.webkit.org/show_bug.cgi?id=163307

Patch by Alex Christensen <[email protected]> on 2016-11-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

* platform/URLParser.cpp:
Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
(WebCore::URLParser::parsedDataView):
(WebCore::URLParser::parse):
Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
This speeds up debug builds considerably, which spent most of the time parsing the path
making and destroying these 1-length StringViews.  It can't hurt release builds.
* platform/URLParser.h:

LayoutTests:

* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (208814 => 208815)


--- trunk/LayoutTests/ChangeLog	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/LayoutTests/ChangeLog	2016-11-16 22:53:48 UTC (rev 208815)
@@ -1,5 +1,15 @@
 2016-11-16  Alex Christensen  <[email protected]>
 
+        REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
+        https://bugs.webkit.org/show_bug.cgi?id=163307
+
+        Reviewed by Alexey Proskuryakov.
+
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac/TestExpectations:
+
+2016-11-16  Alex Christensen  <[email protected]>
+
         Unreviewed gardening.
         https://bugs.webkit.org/show_bug.cgi?id=163127
 

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (208814 => 208815)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-11-16 22:53:48 UTC (rev 208815)
@@ -2726,11 +2726,6 @@
 webkit.org/b/163291 media/video-play-audio-require-user-gesture.html [ Failure ]
 webkit.org/b/163291 media/video-play-require-user-gesture.html
 
-webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size-iframe.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size-iframe.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
-
 webkit.org/b/163755 imported/w3c/csswg-test/css-shapes-1 [ Skip ]
 
 # These font variation tests require a variation font which supports more than 2 axes.

Modified: trunk/LayoutTests/platform/mac/TestExpectations (208814 => 208815)


--- trunk/LayoutTests/platform/mac/TestExpectations	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2016-11-16 22:53:48 UTC (rev 208815)
@@ -1442,11 +1442,6 @@
 
 webkit.org/b/116621 fast/replaced/preferred-widths.html [ Pass Failure ]
 
-webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size-iframe.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/pushstate-size.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size-iframe.html [ Skip ]
-webkit.org/b/163307 [ Debug ] loader/stateobjects/replacestate-size.html [ Skip ]
-
 webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ]
 webkit.org/b/164088 [ Yosemite ] media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Skip ]
 

Modified: trunk/Source/WebCore/ChangeLog (208814 => 208815)


--- trunk/Source/WebCore/ChangeLog	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/Source/WebCore/ChangeLog	2016-11-16 22:53:48 UTC (rev 208815)
@@ -1,3 +1,19 @@
+2016-11-16  Alex Christensen  <[email protected]>
+
+        REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
+        https://bugs.webkit.org/show_bug.cgi?id=163307
+
+        Reviewed by Alexey Proskuryakov.
+
+        * platform/URLParser.cpp:
+        Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
+        (WebCore::URLParser::parsedDataView):
+        (WebCore::URLParser::parse):
+        Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
+        This speeds up debug builds considerably, which spent most of the time parsing the path
+        making and destroying these 1-length StringViews.  It can't hurt release builds.
+        * platform/URLParser.h:
+
 2016-11-16  Chris Dumez  <[email protected]>
 
         Micro-optimize ContainerNode::removeBetween()

Modified: trunk/Source/WebCore/platform/URLParser.cpp (208814 => 208815)


--- trunk/Source/WebCore/platform/URLParser.cpp	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/Source/WebCore/platform/URLParser.cpp	2016-11-16 22:53:48 UTC (rev 208815)
@@ -107,7 +107,6 @@
 template<>
 ALWAYS_INLINE auto CodePointIterator<LChar>::operator++() -> CodePointIterator&
 {
-    ASSERT(!atEnd());
     m_begin++;
     return *this;
 }
@@ -124,7 +123,6 @@
 template<>
 ALWAYS_INLINE auto CodePointIterator<UChar>::operator++() -> CodePointIterator&
 {
-    ASSERT(!atEnd());
     unsigned i = 0;
     size_t length = m_end - m_begin;
     U16_FWD_1(m_begin, i, length);
@@ -1068,6 +1066,13 @@
     return StringView(m_inputString).substring(start, length);
 }
 
+ALWAYS_INLINE UChar URLParser::parsedDataView(size_t position)
+{
+    if (UNLIKELY(m_didSeeSyntaxViolation))
+        return m_asciiBuffer[position];
+    return m_inputString[position];
+}
+
 template<typename CharacterType>
 ALWAYS_INLINE size_t URLParser::currentPosition(const CodePointIterator<CharacterType>& iterator)
 {
@@ -1312,7 +1317,7 @@
                 m_url.m_userStart = currentPosition(c);
                 authorityOrHostBegin = c;
             } else {
-                ASSERT(parsedDataView(currentPosition(c) - 1, 1) == "/");
+                ASSERT(parsedDataView(currentPosition(c) - 1) == '/');
                 m_url.m_userStart = currentPosition(c) - 1;
                 m_url.m_userEnd = m_url.m_userStart;
                 m_url.m_passwordEnd = m_url.m_userStart;
@@ -1600,7 +1605,7 @@
                         appendWindowsDriveLetter(authorityOrHostBegin);
                     }
                     if (windowsQuirk || authorityOrHostBegin == c) {
-                        ASSERT(windowsQuirk || parsedDataView(currentPosition(c) - 1, 1) == "/");
+                        ASSERT(windowsQuirk || parsedDataView(currentPosition(c) - 1) == '/');
                         if (UNLIKELY(*c == '?')) {
                             syntaxViolation(c);
                             appendToASCIIBuffer("/?", 2);
@@ -1663,7 +1668,7 @@
                 m_url.m_pathAfterLastSlash = currentPosition(c);
                 break;
             }
-            if (UNLIKELY(currentPosition(c) && parsedDataView(currentPosition(c) - 1, 1) == "/")) {
+            if (UNLIKELY(currentPosition(c) && parsedDataView(currentPosition(c) - 1) == '/')) {
                 if (UNLIKELY(isDoubleDotPathSegment(c))) {
                     syntaxViolation(c);
                     consumeDoubleDotPathSegment(c);
@@ -1784,7 +1789,7 @@
         LOG_FINAL_STATE("PathOrAuthority");
         ASSERT(m_url.m_userStart);
         ASSERT(m_url.m_userStart == currentPosition(c));
-        ASSERT(parsedDataView(currentPosition(c) - 1, 1) == "/");
+        ASSERT(parsedDataView(currentPosition(c) - 1) == '/');
         m_url.m_userStart--;
         m_url.m_userEnd = m_url.m_userStart;
         m_url.m_passwordEnd = m_url.m_userStart;

Modified: trunk/Source/WebCore/platform/URLParser.h (208814 => 208815)


--- trunk/Source/WebCore/platform/URLParser.h	2016-11-16 22:35:51 UTC (rev 208814)
+++ trunk/Source/WebCore/platform/URLParser.h	2016-11-16 22:53:48 UTC (rev 208815)
@@ -102,6 +102,7 @@
     template<typename CharacterType> void encodeQuery(const Vector<UChar>& source, const TextEncoding&, CodePointIterator<CharacterType>);
     void copyASCIIStringUntil(const String&, size_t length);
     StringView parsedDataView(size_t start, size_t length);
+    UChar parsedDataView(size_t position);
 
     using IPv4Address = uint32_t;
     void serializeIPv4(IPv4Address);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to