diff options
| author | Max Bernstein <rubybugs@bernsteinbear.com> | 2025-09-22 17:27:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-22 21:27:54 +0000 |
| commit | 6b088c876a4e2d41f39acfb0b338b6a178b30089 (patch) | |
| tree | 7201336b834fa85f4359f53215109ff079063448 | |
| parent | 93c728ce9143b2f32e5d3073c8d2c87da8e0db54 (diff) | |
ZJIT: Clean up RangeType (#14627)
| -rw-r--r-- | zjit/src/codegen.rs | 2 | ||||
| -rw-r--r-- | zjit/src/hir.rs | 15 |
2 files changed, 2 insertions, 15 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 03228db0bb..bd7ab84786 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -1290,7 +1290,7 @@ fn gen_new_range( gen_prepare_non_leaf_call(jit, asm, state); // Call rb_range_new(low, high, flag) - asm_ccall!(asm, rb_range_new, low, high, (flag as i64).into()) + asm_ccall!(asm, rb_range_new, low, high, (flag as i32).into()) } fn gen_new_range_fixnum( diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index b3a57a7439..0351b965f8 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -286,6 +286,7 @@ impl Const { } } +#[derive(Clone, Copy)] pub enum RangeType { Inclusive = 0, // include the end value Exclusive = 1, // exclude the end value @@ -306,14 +307,6 @@ impl std::fmt::Debug for RangeType { } } -impl Clone for RangeType { - fn clone(&self) -> Self { - *self - } -} - -impl Copy for RangeType {} - impl From<u32> for RangeType { fn from(flag: u32) -> Self { match flag { @@ -324,12 +317,6 @@ impl From<u32> for RangeType { } } -impl From<RangeType> for u32 { - fn from(range_type: RangeType) -> Self { - range_type as u32 - } -} - /// Special regex backref symbol types #[derive(Debug, Clone, Copy, PartialEq)] pub enum SpecialBackrefSymbol { |
