fix: 结构哈希补全全部变体(消除 code cache 确定性碰撞)

This commit is contained in:
爱特每羊队
2026-08-10 11:49:50 +08:00
parent 0b12e4df18
commit 56ef0efec5
6 changed files with 313 additions and 14 deletions
+9
View File
@@ -37,6 +37,15 @@ pub(super) fn hash_class_element(element: &ClassElement, h: &mut rustc_hash::FxH
statement::hash_statement(stmt, h, include_binding_names);
}
}
ClassElement::AccessorProperty(prop) => {
prop.r#static.hash(h);
prop.computed.hash(h);
property::hash_property_key(&prop.key, h, include_binding_names);
if let Some(value) = &prop.value {
expression::hash_expression(value, h, include_binding_names);
}
}
// TS 索引签名变体在 JS 模式(SourceType::unambiguous)下不可达,落入兜底。
_ => {}
});
}