diff options
| author | Aiden Fox Ivey <aiden.foxivey@shopify.com> | 2025-09-02 17:27:33 -0400 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-09-02 15:57:14 -0700 |
| commit | d51ea6be5061779f6fb5618e687a2b312f0ffd9a (patch) | |
| tree | 4499c03560c22cd33cd9fbd9b4e9d04447f9cf3e | |
| parent | efd2746b3f0b54aac77c568e4d09ed4d1b947c0b (diff) | |
ZJIT: Remove unnecessary return statements
| -rw-r--r-- | zjit/src/backend/arm64/mod.rs | 8 | ||||
| -rw-r--r-- | 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. |
