mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Pack the shadow cascade order in ApplicableDeclarationBlock.
I didn't bother not shifting there. We need to load the whole thing and shift for at least one of cascade level / shadow cascade order. Callers of level() other than for_rule_tree are non-existent in release builds, so we'd be doing the shift anyway. I can implement the same thing for shadow_cascade_order too, but I don't think that optimization is measurable in any way, either, the compiler should make the decision. And just in case, the simpler version actually generated less instructions in: https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly with the simple thing. Bug: 1455032 Reviewed-by: heycam MozReview-Commit-ID: 8xPBJmlcyKh
This commit is contained in:
parent
b1fbb28b8a
commit
b5c18c24fe
3 changed files with 57 additions and 38 deletions
|
@ -170,7 +170,7 @@ const FREE_LIST_LOCKED: *mut RuleNode = 0x02 as *mut RuleNode;
|
|||
///
|
||||
/// In particular, it'd be `0` for the innermost shadow host, `1` for the next,
|
||||
/// and so on.
|
||||
pub type ShadowCascadeOrder = u32;
|
||||
pub type ShadowCascadeOrder = u8;
|
||||
|
||||
impl RuleTree {
|
||||
/// Construct a new rule tree.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue