mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
refactor(lexer): #[inline(always)] on Walks::run_rules (#28648)
Part of effort to move to runtime CPU feature detection. Follow-up after auditing codegen after work so far in this stack. `Walks::run_rules` is Level 3 code, but `gt_run_split` calls it from Level 2. Outside tests, it only returns `true`, and that must fold into `gt_run_split`. So it gets `#[inline(always)]` instead of `cpu_versions!` or `#[inline(never)]`. Its test version too, so both versions are the same shape. Codegen: no change in any build. It was already inlined everywhere.
This commit is contained in:
1 parent
c09f258c0c
commit
08a70931e5
1 file changed
+2
@@ -83,11 +83,13 @@ impl Walks {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[inline(always)]
|
||||
pub(super) fn run_rules(&self) -> bool {
|
||||
!self.full_walk_only && !self.no_run_rules
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[inline(always)]
|
||||
pub(super) fn run_rules(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user