Changeset 203211 in webkit
- Timestamp:
- Jul 13, 2016, 8:45:13 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
cssjit/SelectorCompiler.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r203210 r203211 1 2016-07-13 Benjamin Poulain <benjamin@webkit.org> 2 3 [CSS][ARMv7] :nth-child() do not reserve enough registers if it is in backtracking chain 4 https://bugs.webkit.org/show_bug.cgi?id=159746 5 rdar://problem/26156169 6 7 Reviewed by Andreas Kling. 8 9 The generator generateElementIsNthChild() requires 6 registers in style resolution 10 to mark previous siblings with generateAddStyleRelationIfResolvingStyle() in the loop. 11 12 We were only reserving 5, which is a problem is the sixth is taken by the backtracking 13 register. x86_64 was already requiring 6 for unrelated reasons and ARM64 has so many registers 14 that you cannot possibly run out of them in CSS JIT. 15 16 I generalized the x86_64 path to all architectures. 17 I did not limit this case to style resolution because the extra register is irrelevant 18 in most cases. The only difference is one extra push/pop on ARMv7 if you use querySelector 19 with :nth-child in a backtracking chain. 20 21 This problem is covered by the existing test fast/selectors/nth-child-with-backtracking.html 22 23 * cssjit/SelectorCompiler.cpp: 24 (WebCore::SelectorCompiler::minimumRegisterRequirements): Deleted. 25 1 26 2016-07-13 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r202358 r203211 1067 1067 // Element + ElementData + scratchRegister + attributeArrayPointer + expectedLocalName + (qualifiedNameImpl && expectedValue). 1068 1068 static const unsigned minimumRequiredRegisterCountForAttributeFilter = 6; 1069 #if CPU(X86_64) 1070 // Element + SiblingCounter + SiblingCounterCopy + divisor + dividend + remainder. 1069 // On x86, we always need 6 registers: Element + SiblingCounter + SiblingCounterCopy + divisor + dividend + remainder. 1070 // On other architectures, we need 6 registers for style resolution: 1071 // Element + elementCounter + previousSibling + checkingContext + lastRelation + nextSiblingElement. 1071 1072 static const unsigned minimumRequiredRegisterCountForNthChildFilter = 6; 1072 #endif1073 1073 1074 1074 static unsigned minimumRegisterRequirements(const SelectorFragment& selectorFragment) … … 1094 1094 } 1095 1095 1096 #if CPU(X86_64)1097 1096 if (!selectorFragment.nthChildFilters.isEmpty() || !selectorFragment.nthChildOfFilters.isEmpty() || !selectorFragment.nthLastChildFilters.isEmpty() || !selectorFragment.nthLastChildOfFilters.isEmpty()) 1098 1097 minimum = std::max(minimum, minimumRequiredRegisterCountForNthChildFilter); 1099 #endif1100 1098 1101 1099 // :any pseudo class filters cause some register pressure.
Note:
See TracChangeset
for help on using the changeset viewer.