mirror of
https://github.com/uutils/awk.git
synced 2026-06-10 16:15:04 -07:00
interpreter: high-water mark register sizing
This commit is contained in:
@@ -61,11 +61,12 @@ pub struct Consts<'a>(pub IndexSet<Value<'a>, RandomState, &'a Bump>);
|
||||
|
||||
impl<'a> Interpreter<'a> {
|
||||
pub fn new(compat: ExecMode, code: Code<'a>) -> Self {
|
||||
let n_regs = code.reg_pointer as usize + 1;
|
||||
Self {
|
||||
arena: code.arena,
|
||||
bc: code.bc,
|
||||
program_counter: 0,
|
||||
registers: Registers(bumpalo::vec![in code.arena; Value::Untyped; 8]),
|
||||
registers: Registers(bumpalo::vec![in code.arena; Value::Untyped; n_regs]),
|
||||
symbols: code.symbols,
|
||||
consts: code.consts,
|
||||
compat,
|
||||
|
||||
Reference in New Issue
Block a user