style: 冗余闭包改函数路径并补文档段空行

This commit is contained in:
2026-10-01 09:42:20 +00:00
parent d7f54e331a
commit b4e36fc147
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -266,7 +266,7 @@ impl Vm {
if obj.is_weak_map_obj() {
weak_map::rewrite_weak_map_native(
obj,
|key| crate::session_gc::resolve_weak_key_after_promotion(key),
crate::session_gc::resolve_weak_key_after_promotion,
|value| value,
);
}
@@ -279,7 +279,7 @@ impl Vm {
if obj.is_weak_map_obj() {
weak_map::rewrite_weak_map_native(
obj,
|key| crate::session_gc::resolve_weak_key_after_promotion(key),
crate::session_gc::resolve_weak_key_after_promotion,
|value| value,
);
}
+1 -1
View File
@@ -622,7 +622,7 @@ impl SessionGc {
if obj.is_gc_marked() && obj.is_weak_map_obj() {
// SAFETY: 弱表 native 盒独占,整表重建在定夺期间无并发读者。
unsafe {
weak_map::rewrite_weak_map_native(&mut *ptr, |key| resolve_weak_key_sweep(key), |value| value);
weak_map::rewrite_weak_map_native(&mut *ptr, resolve_weak_key_sweep, |value| value);
}
}
}
@@ -1,5 +1,6 @@
//! 生成器 × session GC 回归:full_reset 逐对象释放 session 生成器(本体 + 堆数据
//! + upvalue 列表,各单所有权),不 double-free、不悬垂,VM 继续可用。
//!
//! sweep 变体与闭包捕获变体见 `vm_support.rs` 内部测试(需 crate 内 `resume_generator`
//! 在模块表未重建时恢复执行,integration 层无法触达)。