WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
136936
CSS JIT: Don't add backtracking register count to minimum register count if it's not necessary
https://bugs.webkit.org/show_bug.cgi?id=136936
Summary
CSS JIT: Don't add backtracking register count to minimum register count if i...
Yusuke Suzuki
Reported
2014-09-18 19:29:57 PDT
minimumRequiredRegisterCount always contains `BacktrackingRegister`. However when the fragment is not inside InChainWithDescendantTail, this register is not allocated. So adding `backtrackingRegisterRequirements` only if it's necessary.
Attachments
Patch
(3.02 KB, patch)
2014-09-18 19:34 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(3.03 KB, patch)
2014-09-24 18:28 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2014-09-18 19:34:43 PDT
Created
attachment 238348
[details]
Patch
Benjamin Poulain
Comment 2
2014-09-18 22:19:02 PDT
That would be useful for ARMv7. But we would need to re-check all the generators because everything was coded with the assumption of 6 for the rightmost fragment. For example, I believe :nth-child() uses 6 registers on x86 when doing style resolution for the rightmost selector. I can check that tomorrow. In any case, we should land this after
https://bugs.webkit.org/show_bug.cgi?id=136933
to have better chance of catching mistakes.
Yusuke Suzuki
Comment 3
2014-09-18 22:22:35 PDT
(In reply to
comment #2
)
> That would be useful for ARMv7. But we would need to re-check all the generators because everything was coded with the assumption of 6 for the rightmost fragment. > > For example, I believe :nth-child() uses 6 registers on x86 when doing style resolution for the rightmost selector. I can check that tomorrow. > > In any case, we should land this after
https://bugs.webkit.org/show_bug.cgi?id=136933
to have better chance of catching mistakes.
You're right. That patch[1] points out invalid assumption by raising assertion failures. It makes this patch safer. [1]:
https://bugs.webkit.org/show_bug.cgi?id=136933
Yusuke Suzuki
Comment 4
2014-09-24 18:27:38 PDT
To ensure this patch pass the test under the
https://bugs.webkit.org/show_bug.cgi?id=136933
, I'll re-upload the same patch.
Yusuke Suzuki
Comment 5
2014-09-24 18:28:03 PDT
Created
attachment 238633
[details]
Patch
Benjamin Poulain
Comment 6
2014-09-25 17:29:49 PDT
Comment on
attachment 238633
[details]
Patch Clearing the review flag. The patch is likely correct, but I don't think the gain/risk is worth it at this very moment. My rationale: All the code has been verified for 6 registers for the rightmost fragment and 5 for backtracking. Verifying all the generators for 5 registers would be very time consuming, it would probably take me an entire day of review. We are on the verge of adding complex new capabilities to the engine. There are at least two features that will need great attention: 1) matching multiple pseudo elements with :matches() 2) Multilevel backtracking for :nth-child(), :matches() and :not(). The minus side of not including this patch is some performance impact on ARMv7. But even today without it we are several times faster than any competing engine.
Yusuke Suzuki
Comment 7
2014-09-26 08:04:29 PDT
(In reply to
comment #6
)
> (From update of
attachment 238633
[details]
) > Clearing the review flag. > > The patch is likely correct, but I don't think the gain/risk is worth it at this very moment. > > My rationale: > > All the code has been verified for 6 registers for the rightmost fragment and 5 for backtracking. Verifying all the generators for 5 registers would be very time consuming, it would probably take me an entire day of review. > > We are on the verge of adding complex new capabilities to the engine. There are at least two features that will need great attention: 1) matching multiple pseudo elements with :matches() 2) Multilevel backtracking for :nth-child(), :matches() and :not(). > > The minus side of not including this patch is some performance impact on ARMv7. But even today without it we are several times faster than any competing engine.
Make sense. Yup, that's reasonable decision. So closing this issue :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug