Bug 262498 - Use StringView in CSSParserToken and simplify its code
Summary: Use StringView in CSSParserToken and simplify its code
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 263153
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-02 12:50 PDT by Chris Dumez
Modified: 2023-10-13 19:22 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2023-10-02 12:50:43 PDT
Use StringView in CSSParserToken and simplify its code.

Previously, CSSParserToken wasn't using StringView internally for better bit packing, as the size of this object matters a lot.
Instead, do better bit packing in StringView so that CSSParserToken can use it without increasing its size (24 bits on my macBookPro M1).

To better bit-pack StringView, we rely on PackedPtr to fit the is8Bit flag in the same word as the character pointer.

This is performance neutral on Speedometer.
Comment 1 Chris Dumez 2023-10-02 12:53:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/18508
Comment 2 EWS 2023-10-02 20:09:40 PDT
Committed 268760@main (855b9cf6ef5a): <https://commits.webkit.org/268760@main>

Reviewed commits have been landed. Closing PR #18508 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-10-02 20:10:15 PDT
<rdar://problem/116381450>
Comment 4 WebKit Commit Bot 2023-10-13 19:22:07 PDT
Re-opened since this is blocked by bug 263153