mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
style: Move size of tests to compile-time tests in the style crate
Same reasoning as the previous commit. Differential Revision: https://phabricator.services.mozilla.com/D146104
This commit is contained in:
parent
50d31686be
commit
f48b95e2e3
13 changed files with 53 additions and 49 deletions
|
@ -3115,6 +3115,12 @@ impl Rule {
|
|||
}
|
||||
}
|
||||
|
||||
// The size of this is critical to performance on the bloom-basic
|
||||
// microbenchmark.
|
||||
// When iterating over a large Rule array, we want to be able to fast-reject
|
||||
// selectors (with the inline hashes) with as few cache misses as possible.
|
||||
size_of_test!(Rule, 40);
|
||||
|
||||
/// A function to be able to test the revalidation stuff.
|
||||
pub fn needs_revalidation_for_testing(s: &Selector<SelectorImpl>) -> bool {
|
||||
let mut attribute_dependencies = Default::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue