docs: kernel session 组注释改写与断链消解

This commit is contained in:
2026-09-17 04:29:24 +00:00
parent 2d48a7e253
commit eb6c441d62
5 changed files with 35 additions and 28 deletions
+3 -3
View File
@@ -219,8 +219,8 @@ impl BuiltinId {
];
}
// 顺序钉:ALL 与判别值 0..NUM_BUILTINS 严格同序(无换序、无重复、无遗漏);
// 错位即快照/脏检查按下标误读,钉成编译失败。
// 编译期自检:ALL 必须与判别值 0..NUM_BUILTINS 严格同序(无换序、无重复、无遗漏);
// 错位即快照/脏检查按下标误读,const 求值使错位直接成为编译错误。
const _: () = {
let mut i = 0;
while i < BuiltinId::ALL.len() {
@@ -233,7 +233,7 @@ const _: () = {
/// 内置对象世代(generation)快照:记录构造时各对象及其 stub 的世代号与数量。
///
/// 供 [`KernelSession::dirty_since_snapshot`] 对比,判断哪些 builtin 家族在运行期被污染。
/// 供 [`crate::kernel::KernelSession::dirty_since_snapshot`] 对比,判断哪些 builtin 家族在运行期被污染。
#[derive(Clone, Debug)]
pub struct BuiltinSnapshot {
pub generations: [u32; NUM_BUILTINS],