Skip to content

Commit

Permalink
perf(lexer): align Token on 8
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jan 17, 2025
1 parent 979be1a commit c1d2f83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_parser/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use oxc_span::Span;
use super::kind::Kind;

#[derive(Debug, Clone, Copy, Default)]
// Align `Token` on 8 on 64-bit platforms (same alignment as `Span`)
#[cfg_attr(target_pointer_width = "64", repr(align(8)))]
pub struct Token {
/// Token Kind
pub kind: Kind,
Expand Down

0 comments on commit c1d2f83

Please sign in to comment.