mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +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
|
@ -35,7 +35,7 @@ size_of_test!(test_size_of_element_data, ElementData, 24);
|
|||
|
||||
size_of_test!(test_size_of_property_declaration, style::properties::PropertyDeclaration, 32);
|
||||
|
||||
size_of_test!(test_size_of_application_declaration_block, ApplicableDeclarationBlock, 32);
|
||||
size_of_test!(test_size_of_application_declaration_block, ApplicableDeclarationBlock, 24);
|
||||
size_of_test!(test_size_of_rule_node, RuleNode, 80);
|
||||
|
||||
// This is huge, but we allocate it on the stack and then never move it,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue