feat: hashmap with_capacity

This commit is contained in:
2025-05-17 20:04:12 +08:00
parent 7b55a15281
commit ec61eaa140
4 changed files with 16 additions and 10 deletions

View File

@@ -182,8 +182,8 @@ impl<'vm, 'jit: 'vm> VM<'jit> {
let elem = stack.pop();
stack.tos_mut()?.push(elem);
}
OpCode::AttrSet => {
stack.push(Value::AttrSet(AttrSet::empty().into()))?;
OpCode::AttrSet { cap } => {
stack.push(Value::AttrSet(AttrSet::with_capacity(cap).into()))?;
}
OpCode::FinalizeRec => {
let env = env.clone().enter(