REGRESSION(r235917): 2% regression in Dromaeo CSS selector on MacBookPro11,4
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Sep 2018 22:31:18 +0000 (22:31 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Sep 2018 22:31:18 +0000 (22:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189738

Reviewed by Yusuke Suzuki.

The regression was caused by the regundant walk to the parent element. Removed it to fix the regression.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/cssjit/SelectorCompiler.cpp

index 09cb9fb..0897079 100644 (file)
@@ -1,3 +1,16 @@
+2018-09-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        REGRESSION(r235917): 2% regression in Dromaeo CSS selector on MacBookPro11,4
+        https://bugs.webkit.org/show_bug.cgi?id=189738
+
+        Reviewed by Yusuke Suzuki.
+
+        The regression was caused by the regundant walk to the parent element. Removed it to fix the regression.
+
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
+
 2018-09-19  John Wilander  <wilander@apple.com>
 
         Resource Load Statistics: Add optional cap on partitioned cache max age
index fee16ac..e3eb5f7 100644 (file)
@@ -3551,7 +3551,6 @@ void SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate(Assembl
     failureCases.append(m_assembler.branchTestPtr(Assembler::Zero, parentNode));
     Assembler::Jump notElement = DOMJIT::branchTestIsElementFlagOnNode(m_assembler, Assembler::Zero, parentNode);
 
-    generateWalkToParentElement(failureCases, parentNode);
     auto relation = fragmentMatchesRightmostOrAdjacentElement(fragment)
         ? Style::Relation::ChildrenAffectedByForwardPositionalRules
         : Style::Relation::DescendantsAffectedByForwardPositionalRules;
@@ -3673,7 +3672,6 @@ void SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate(Ass
     failureCases.append(m_assembler.branchTestPtr(Assembler::Zero, parentNode));
     Assembler::Jump notElement = DOMJIT::branchTestIsElementFlagOnNode(m_assembler, Assembler::Zero, parentNode);
 
-    generateWalkToParentElement(failureCases, parentNode);
     auto relation = fragmentMatchesRightmostOrAdjacentElement(fragment)
         ? Style::Relation::ChildrenAffectedByBackwardPositionalRules
         : Style::Relation::DescendantsAffectedByBackwardPositionalRules;