feat(vm): add reference identity and deterministic value hashing
This commit is contained in:
@@ -52,6 +52,19 @@ pub enum TypeKind {
|
||||
Trait(Vec<MethodDecl>),
|
||||
Fn(Signature),
|
||||
}
|
||||
impl TypeKind {
|
||||
/// Categories supported by identity queries, not by legacy REF_* conversions.
|
||||
pub fn is_identity_reference(&self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
Self::Struct(_)
|
||||
| Self::Array(_)
|
||||
| Self::Fn(_)
|
||||
| Self::Trait(_)
|
||||
| Self::Builtin(BuiltinId::RANDOM)
|
||||
)
|
||||
}
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct TypeDecl {
|
||||
pub name: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user