Skip to content

Commit 41b2914

Browse files
committed
fix jit
1 parent 17b6a2d commit 41b2914

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/jit/src/instructions.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,9 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
660660
Instruction::LoadFastLoadFast { var_nums }
661661
| Instruction::LoadFastBorrowLoadFastBorrow { var_nums } => {
662662
let oparg = var_nums.get(arg);
663-
let idx1 = oparg >> 4;
664-
let idx2 = oparg & 0xF;
663+
let (idx1, idx2) = oparg.indexes();
665664
for idx in [idx1, idx2] {
666-
let local = self.variables[idx as usize]
665+
let local = self.variables[idx]
667666
.as_ref()
668667
.ok_or(JitCompileError::BadBytecode)?;
669668
self.stack.push(JitValue::from_type_and_value(

0 commit comments

Comments
 (0)