chore(tpv): 清理过时注释——run_llc_parallel 步进说明、追加89 -> None 说明、Gen 模块迁移说明

This commit is contained in:
TermiNexus committed 2026-08-21 01:37:46 +08:00
1 parent a088f21bce
commit 0e48190ba9
3 files changed
-16

No files matched your search

-3
View File
@@ -577,9 +577,6 @@ def run_llc_parallel(tasks: bytes, task_count: int, max_threads: int) -> int:
slot_size: t.CSizeT = LlcTask.__sizeof__()
ret: int = 0
# 分批执行:batch_start 按 max_threads 步进(每批 spawn+join+close 一批句柄)。
# 注意:不能 range(task_count)(步进 1)——join 循环 handles.get(batch_start+j)
# 会取到上一批已 CloseHandle 的句柄 → WaitForSingleObject 返回 WAIT_FAILED(-1)
# 立即返回 → 误报"600 秒超时"(实际未到 600 秒)。
for batch_start in range(0, task_count, max_threads):
batch_n: int = max_threads
if batch_start + batch_n > task_count:
-7
View File
@@ -936,10 +936,6 @@ class TypeGenResolve(TypeGenBase.TypeGenBase):
# Constant 节点: 字符串注解(如 'MemManager'),当作无引号的 Name/Attribute/BinOp 处理
if k == ast.ASTKind.Constant:
cn: ast.Constant | t.CPtr = (ast.Constant | t.CPtr)(node)
# -> None 无返回值注解 → Void(追加89:-> None 被 parser 解析为
# CONST_NONE 常量而非 Name('None'),此前直接 return None → ret_ty
# 回退 i32 → 掉出末尾被 fail-fast 误杀,BuildPipeline.set_asan_mode
# "依旧"根因;Name 分支的 "None" 归一为字符串注解形式的双保险)
if cn.const_kind == ast.CONST_NONE:
return llvmlite.Void(pool)
if cn.const_kind == ast.CONST_STR and cn.str_val is not None:
@@ -989,9 +985,6 @@ class TypeGenResolve(TypeGenBase.TypeGenBase):
# str = bytes = str = i8*
if string.strcmp(nm.id, "str") == 0:
return llvmlite.Ptr(pool, llvmlite.Int8(pool))
# -> None 无返回值注解 → Void(追加89:与 VpiReader "None"→Void
# 归一对齐;缺失时 -> None 解析失败回退 i32,函数掉出末尾被
# fail-fast 误杀,BuildPipeline.set_asan_mode 根因)
elif string.strcmp(nm.id, "None") == 0:
return llvmlite.Void(pool)
elif string.strcmp(nm.id, "int") == 0:
-6
View File
@@ -1,10 +1,4 @@
# ============================================================
# Gen - 对象化生成器(P1 骨架 + P2 TypeGenMixin)
#
# Generator: 翻译状态容器 + Mixin 组合(BaseGen 状态 + TypeGen 类型映射,
# 后续按 wiki/14-oo-refactor.md 的 P3-P6 逐步吸收 Handles 模块)。
#
# 全局单例(set_global_gen/get_global_gen)已迁移至
# lib.core.Gen.Generator 模块(P2 修复:TPC 不注册包短名,函数体
# import 包名会报 Unknown module,非包模块短名可被注册)。
# ============================================================