fix: 修复变量过多导致寄存器溢出问题

This commit is contained in:
2026-06-06 18:53:37 +08:00
parent b0b55abbe1
commit 66be6d58af
+1 -1
View File
@@ -81,7 +81,7 @@ impl CompileCtx {
pub(crate) fn alloc_reg(&mut self) -> u8 {
let r = self.next_reg;
self.next_reg += 1;
self.next_reg = self.next_reg.wrapping_add(1);
if self.next_reg > self.max_regs {
self.max_regs = self.next_reg;
}