Skip to content

Commit d682618

Browse files
committed
fix jit
1 parent a37bd3c commit d682618

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/jit/src/instructions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
162162
let target = after
163163
.checked_add(u32::from(arg))
164164
.ok_or(JitCompileError::BadBytecode)?;
165-
Ok(Label::new(target))
165+
Ok(Label::from_u32(target))
166166
}
167167

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

183183
fn instruction_target(
@@ -232,7 +232,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
232232
let mut in_unreachable_code = false;
233233

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

238238
// If this is a label that some earlier jump can target,

0 commit comments

Comments
 (0)