feat: use hashbrown

This commit is contained in:
2025-05-17 19:45:41 +08:00
parent fb14027845
commit 7b55a15281
12 changed files with 89 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
use std::cell::OnceCell;
use std::cell::RefCell;
use std::collections::HashSet;
use hashbrown::HashSet;
use std::hash::Hash;
use std::rc::Rc;
@@ -219,11 +219,11 @@ impl<'vm> Value<'vm> {
}
}
pub fn eq(self, other: Self) -> Self {
pub fn eq(self, other: Self, vm: &'vm VM<'_>) -> Self {
use Const::Bool;
match (self, other) {
(x @ Value::Catchable(_), _) | (_, x @ Value::Catchable(_)) => x,
(s, other) => VmConst(Bool(s == other)),
(s, other) => VmConst(Bool(s.eq_impl(&other, vm))),
}
}