Skip to content

Commit

Permalink
fix(singlepass): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Mar 28, 2024
1 parent 87e9bec commit 338b15d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/compiler-singlepass/src/machine_arm64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ pub struct MachineARM64 {
pushed: bool,
/// Vector of unwind operations with offset
unwind_ops: Vec<(usize, UnwindOps)>,
/// The actual compilation target.
target: Option<Target>,
/// A boolean flag signaling if this machine supports NEON.
has_neon: bool,
}
Expand Down Expand Up @@ -142,6 +140,9 @@ enum ImmType {
#[allow(dead_code)]
impl MachineARM64 {
pub fn new(target: Option<Target>) -> Self {
// If and when needed, checks for other supported features should be
// added as boolean fields in the struct to make checking if such
// features are available as cheap as possible.
let has_neon = match target {
Some(ref target) => target.cpu_features().contains(CpuFeature::NEON),
None => false,
Expand All @@ -156,7 +157,6 @@ impl MachineARM64 {
src_loc: 0,
pushed: false,
unwind_ops: vec![],
target,
has_neon,
}
}
Expand Down

0 comments on commit 338b15d

Please sign in to comment.