Skip to content

Commit e9c0911

Browse files
committed
fix after merge
1 parent f87a630 commit e9c0911

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/compiler-core/src/bytecode/instruction.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,8 @@ impl InstructionMetadata for Instruction {
13331333
pad: usize,
13341334
level: usize,
13351335
) -> fmt::Result {
1336+
let opname = self.name();
1337+
13361338
macro_rules! w {
13371339
// No oparg. Show only opcode name
13381340
() => {
@@ -1356,8 +1358,6 @@ impl InstructionMetadata for Instruction {
13561358
};
13571359
}
13581360

1359-
let opname = self.name();
1360-
13611361
let varname = |var_num: oparg::VarNum| ctx.get_varname(var_num);
13621362
let name = |i: u32| ctx.get_name(i as usize);
13631363
let cell_name = |i: u32| ctx.get_cell_name(i as usize);
@@ -1465,7 +1465,7 @@ impl InstructionMetadata for Instruction {
14651465
let (idx1, idx2) = oparg.indexes();
14661466
let name1 = varname(idx1);
14671467
let name2 = varname(idx2);
1468-
write!(f, "{:pad$}({}, {})", opnmae, name1, name2)
1468+
write!(f, "{:pad$}({}, {})", opname, name1, name2)
14691469
}
14701470
Self::LoadFastBorrowLoadFastBorrow { var_nums } => {
14711471
let oparg = var_nums.get(arg);
@@ -1552,7 +1552,7 @@ impl InstructionMetadata for Instruction {
15521552
Self::StoreFastLoadFast { var_nums } => {
15531553
let oparg = var_nums.get(arg);
15541554
let (store_idx, load_idx) = oparg.indexes();
1555-
write!(f, " {:pad$}({}, {})", opnmae, store_idx, load_idx)
1555+
write!(f, " {:pad$}({}, {})", opname, store_idx, load_idx)
15561556
}
15571557
Self::StoreFastStoreFast { var_nums } => {
15581558
let oparg = var_nums.get(arg);

0 commit comments

Comments
 (0)