mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 03:31:12 +08:00
fix: LOAD_UPVALUE 的 uv_idx 改 Imm 编码避免被 RegAlloc 重写
This commit is contained in:
@@ -15,7 +15,7 @@ impl Emitter {
|
|||||||
if up.name == name {
|
if up.name == name {
|
||||||
let r = ctx.alloc_reg();
|
let r = ctx.alloc_reg();
|
||||||
let idx = uv_idx as u8;
|
let idx = uv_idx as u8;
|
||||||
ctx.inst(Inst::new(OpCode::LOAD_UPVALUE, Operand::Reg(r), Operand::Reg(idx as u32), Operand::None));
|
ctx.inst(Inst::new(OpCode::LOAD_UPVALUE, Operand::Reg(r), Operand::Imm(idx as u16), Operand::None));
|
||||||
return Ok(r);
|
return Ok(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user