refactor(tpv): rowptr[T] 迁移 + D 表定长缓冲改精确分配 + SHA1 前缀判定收敛(D1/D3/D4/D5/D6/D7/C10)

This commit is contained in:
TermiNexus committed 2026-09-12 11:09:35 +08:00
1 parent 7471cc64f9
commit 82eea2719f
66 files changed
+2709 -2604

No files matched your search

+19 -26
View File
@@ -1,26 +1,19 @@
import t, c
import memhub
# ============================================================
# CompilerFactory - 编译器结构体工厂(对齐 TPC Translator 装配模式)
# ============================================================
@t.NoVTable
class CompilerFactory:
"""编译器结构体工厂(持有主池/永久池等共享对象)"""
Pool: memhub.MemBuddy | t.CPtr # 主内存池(瞬时数据,mark/reset 回收)
PermPool: memhub.MemBuddy | t.CPtr # 永久内存池(持久数据,从不 reset)
def __init__(self, pool: memhub.MemBuddy | t.CPtr,
perm_pool: memhub.MemBuddy | t.CPtr):
if self is None:
return
self.Pool = pool
self.PermPool = perm_pool
# ============================================================
# 全局工厂单例
# ============================================================
factory: CompilerFactory | t.CPtr = None
import t, c
import memhub
# ============================================================
# CompilerFactory - 编译器结构体工厂(对齐 TPC Translator 装配模式)
# ============================================================
@t.NoVTable
class CompilerFactory:
"""编译器结构体工厂(持有主池/永久池等共享对象)"""
Pool: rowptr[memhub.MemBuddy] # 主内存池(瞬时数据,mark/reset 回收)
PermPool: rowptr[memhub.MemBuddy] # 永久内存池(持久数据,从不 reset)
def __init__(self, pool: rowptr[memhub.MemBuddy], perm_pool: rowptr[memhub.MemBuddy]):
if self is None: return
self.Pool = pool
self.PermPool = perm_pool
# 全局工厂单例
factory: rowptr[CompilerFactory] = None