feat: hashmap with_capacity

This commit is contained in:
imxyy1soope1 committed 2025-05-17 20:04:12 +08:00
1 parent 7b55a15281
commit ec61eaa140
4 files changed
+16 -10

No files matched your search

+2 -2
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(