Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix jit
  • Loading branch information
ShaharNaveh committed Mar 27, 2026
commit d682618f3aec386bdc830f20955f3f27f83b7bb7
6 changes: 3 additions & 3 deletions crates/jit/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
let target = after
.checked_add(u32::from(arg))
.ok_or(JitCompileError::BadBytecode)?;
Ok(Label::new(target))
Ok(Label::from_u32(target))
}

fn jump_target_backward(
Expand All @@ -177,7 +177,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
let target = after
.checked_sub(u32::from(arg))
.ok_or(JitCompileError::BadBytecode)?;
Ok(Label::new(target))
Ok(Label::from_u32(target))
}

fn instruction_target(
Expand Down Expand Up @@ -232,7 +232,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
let mut in_unreachable_code = false;

for (offset, &raw_instr) in clean_instructions.iter().enumerate() {
let label = Label::new(offset as u32);
let label = Label::from_u32(offset as u32);
let (instruction, arg) = arg_state.get(raw_instr);

// If this is a label that some earlier jump can target,
Expand Down
Loading