docs(tpv): 精简 CompilerFactory 装配设计注释块
This commit is contained in:
1 parent
679758c05b
commit
7471cc64f9
1 file changed
-17
@@ -4,23 +4,6 @@ import memhub
|
||||
|
||||
# ============================================================
|
||||
# CompilerFactory - 编译器结构体工厂(对齐 TPC Translator 装配模式)
|
||||
#
|
||||
# TPC 的 Translator 在 __init__ 集中创建编译器各子对象(Handler/
|
||||
# SymbolTable/Exportable 等),是编译器的"装配器/工厂";TPV 的 main
|
||||
# 目前手动创建 mb/gen 并逐模块注入(_mbuddy/set_global_gen),装配
|
||||
# 逻辑散落。本工厂集中持有编译器级共享内存对象:
|
||||
#
|
||||
# - Pool :主内存池(MemBuddy,瞬时数据,受 mark/reset_to 回收)
|
||||
# - PermPool :永久内存池(MemBuddy,跨 mark 持久数据专用,从不 reset)
|
||||
#
|
||||
# 各模块经模块级委托 CompilerFactory.PermPool 获取永久池,
|
||||
# 避免把编译器专属单例塞进通用内存库 memhub(memhub 保持通用)。
|
||||
# includes 层(llvmlite/__types.vp 的 DeepCopyType)不依赖本工厂:
|
||||
# 深拷贝的分配源由调用方以 pool 参数传入(传 PermPool 即持久)。
|
||||
# 类名与模块名同名(均为 CompilerFactory):合法场景,TPC 已支持
|
||||
# 模块别名优先解析——`X.func()` 中 X 是 import 别名(IsModuleAlias)
|
||||
# 时按模块函数处理,`X.X(args)` 的类构造按 FuncAttr==类名 走 struct
|
||||
# 路径,二者互不冲突(勿再改类名规避,见用户明确要求)。
|
||||
# ============================================================
|
||||
@t.NoVTable
|
||||
class CompilerFactory:
|
||||
|
||||
Reference in new issue
Block a user