From d51ea6be5061779f6fb5618e687a2b312f0ffd9a Mon Sep 17 00:00:00 2001 From: Aiden Fox Ivey Date: Tue, 2 Sep 2025 17:27:33 -0400 Subject: ZJIT: Remove unnecessary return statements --- zjit/src/backend/arm64/mod.rs | 8 ++++---- zjit/src/codegen.rs | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/zjit/src/backend/arm64/mod.rs b/zjit/src/backend/arm64/mod.rs index 664e65f7aa..ef5a4aadd6 100644 --- a/zjit/src/backend/arm64/mod.rs +++ b/zjit/src/backend/arm64/mod.rs @@ -140,17 +140,17 @@ fn emit_load_value(cb: &mut CodeBlock, rd: A64Opnd, value: u64) -> usize { // If the value fits into a single movz // instruction, then we'll use that. movz(cb, rd, A64Opnd::new_uimm(current), 0); - return 1; + 1 } else if u16::try_from(!value).is_ok() { // For small negative values, use a single movn movn(cb, rd, A64Opnd::new_uimm(!value), 0); - return 1; + 1 } else if BitmaskImmediate::try_from(current).is_ok() { // Otherwise, if the immediate can be encoded // with the special bitmask immediate encoding, // we'll use that. mov(cb, rd, A64Opnd::new_uimm(current)); - return 1; + 1 } else { // Finally we'll fall back to encoding the value // using movz for the first 16 bits and movk for @@ -176,7 +176,7 @@ fn emit_load_value(cb: &mut CodeBlock, rd: A64Opnd, value: u64) -> usize { movk(cb, rd, A64Opnd::new_uimm(current & 0xffff), 48); num_insns += 1; } - return num_insns; + num_insns } } diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 4494b23824..40b0e400b2 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -1522,14 +1522,13 @@ fn build_side_exit(jit: &mut JITState, state: &FrameState, reason: SideExitReaso locals.push(jit.get_opnd(insn_id)); } - let target = Target::SideExit { + Target::SideExit { pc: state.pc, stack, locals, reason, label, - }; - target + } } /// Return true if a given ISEQ is known to escape EP to the heap on entry. -- cgit v1.2.3