Skip to content

Commit

Permalink
refactor(transformer/class-properties): #[inline(always)] on `asser…
Browse files Browse the repository at this point in the history
…t_expr_neither_parenthesis_nor_typescript_syntax` (#7802)

Follow-on after #7795. Add `#[inline(always)]` to this function which is no-op in release mode, to make absolutely sure it gets optimized out in full.
  • Loading branch information
overlookmotel committed Dec 11, 2024
1 parent 2964a61 commit 3cdc47c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/oxc_transformer/src/es2022/class_properties/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ pub(super) fn create_underscore_ident_name<'a>(ctx: &mut TraverseCtx<'a>) -> Ide
ctx.ast.identifier_name(SPAN, Atom::from("_"))
}

#[inline]
// `#[inline(always)]` because this is a no-op in release mode
#[expect(clippy::inline_always)]
#[inline(always)]
pub(super) fn assert_expr_neither_parenthesis_nor_typescript_syntax(
expr: &Expression,
path: &PathBuf,
Expand Down

0 comments on commit 3cdc47c

Please sign in to comment.