Fix: aggregate regs must be initialized as NULL at the start

This commit is contained in:
Jussi Saurio 2025-05-29 18:43:58 +03:00
parent 5af837d50a
commit f8257df77b
5 changed files with 63 additions and 18 deletions

View file

@ -248,6 +248,19 @@ impl ProgramBuilder {
reg
}
pub fn alloc_registers_and_init_w_null(&mut self, amount: usize) -> usize {
let reg = self.alloc_registers(amount);
self.emit_insn(Insn::Null {
dest: reg,
dest_end: if amount == 1 {
None
} else {
Some(reg + amount - 1)
},
});
reg
}
pub fn alloc_cursor_id_keyed(&mut self, key: CursorKey, cursor_type: CursorType) -> usize {
assert!(
!self