Reinstate {Early,Late}LintPassObjects
.
I removed these in #105291, and subsequently learned they are necessary for performance. This commit reinstates them with the new and more descriptive names `RuntimeCombined{Early,Late}LintPass`, similar to the existing passes like `BuiltinCombinedEarlyLintPass`. It also adds some comments, particularly emphasising how we have ways to combine passes at both compile-time and runtime. And it moves some comments around.
This commit is contained in:
parent
2b05f84115
commit
3c53781800
4 changed files with 106 additions and 40 deletions
|
@ -95,6 +95,11 @@ macro_rules! expand_combined_late_lint_pass_methods {
|
|||
)
|
||||
}
|
||||
|
||||
/// Combines multiple lints passes into a single lint pass, at compile time,
|
||||
/// for maximum speed. Each `check_foo` method in `$methods` within this pass
|
||||
/// simply calls `check_foo` once per `$pass`. Compare with
|
||||
/// `LateLintPassObjects`, which is similar, but combines lint passes at
|
||||
/// runtime.
|
||||
#[macro_export]
|
||||
macro_rules! declare_combined_late_lint_pass {
|
||||
([$v:vis $name:ident, [$($pass:ident: $constructor:expr,)*]], $methods:tt) => (
|
||||
|
@ -198,6 +203,11 @@ macro_rules! expand_combined_early_lint_pass_methods {
|
|||
)
|
||||
}
|
||||
|
||||
/// Combines multiple lints passes into a single lint pass, at compile time,
|
||||
/// for maximum speed. Each `check_foo` method in `$methods` within this pass
|
||||
/// simply calls `check_foo` once per `$pass`. Compare with
|
||||
/// `EarlyLintPassObjects`, which is similar, but combines lint passes at
|
||||
/// runtime.
|
||||
#[macro_export]
|
||||
macro_rules! declare_combined_early_lint_pass {
|
||||
([$v:vis $name:ident, [$($pass:ident: $constructor:expr,)*]], $methods:tt) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue