Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 0343db1

Browse files
committed
box switch instructions
1 parent 33b67f4 commit 0343db1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

enjarify-rs/src/jvm/ir.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub enum JvmInstructionSub {
3131
OtherConstant,
3232
Goto(GotoImpl),
3333
If(IfImpl),
34-
Switch(SwitchImpl),
34+
Switch(Box<SwitchImpl>),
3535
Other,
3636
}
3737
pub use self::JvmInstructionSub::*;
@@ -219,7 +219,7 @@ pub fn switch(default: u32, jumps: HashMap<i32, u32>) -> JvmInstruction {
219219
let table_size = 4*(table_count+1);
220220
let jump_size = 8*(jumps.len() as i64);
221221

222-
JvmInstruction{bytecode: None, sub: Switch(
222+
JvmInstruction{bytecode: None, sub: Switch(Box::new(
223223
SwitchImpl{
224224
default: default,
225225
jumps: jumps,
@@ -229,7 +229,7 @@ pub fn switch(default: u32, jumps: HashMap<i32, u32>) -> JvmInstruction {
229229
is_table: jump_size > table_size,
230230
nopad_size: 9 + min(jump_size, table_size) as u32,
231231
}
232-
)}
232+
))}
233233
}
234234

235235
pub fn other(bc: BString) -> JvmInstruction { JvmInstruction{bytecode: Some(bc), sub: Other} }

0 commit comments

Comments
 (0)