refactor(TransPyV): 统一自举写法(novirtual / define / rawptr→* / 去续行反斜杠)
- @t.NoVTable class X → novirtual class X
- t.CDefine = N → define N
- rawptr[X]、X | t.CPtr → X*
- t.CPtr → rawptr(裸指针标记)
- t.Callable[...] → callable[...]
- 去掉 if/elif 条件的行续反斜杠(改单行写法)
- w32.win32file.X → win32file.X(已 import as)
- core/__init__.vp 去掉未使用的 import t, c / from stdint import *
涉及:CompilerFactory、IncludesScanner、Repl、core/__init__、
Gen/Call/{CallGenBase,CallGenCBuiltin,CallGenCall,CallGenDispatch,CallGenLeafKit}、
Gen/Class/ClassGenGeneric。
This commit is contained in:
1 parent
7e82ed6940
commit
1ad7abf33d
10 files changed
+156
-223
No files matched your search
@@ -5,8 +5,7 @@ import memhub
|
||||
# ============================================================
|
||||
# CompilerFactory - 编译器结构体工厂(对齐 TPC Translator 装配模式)
|
||||
# ============================================================
|
||||
@t.NoVTable
|
||||
class CompilerFactory:
|
||||
novirtual class CompilerFactory:
|
||||
"""编译器结构体工厂(持有主池/永久池等共享对象)"""
|
||||
Pool: memhub.MemBuddy* # 主内存池(瞬时数据,mark/reset 回收)
|
||||
PermPool: memhub.MemBuddy* # 永久内存池(持久数据,从不 reset)
|
||||
@@ -32,4 +31,4 @@ class CompilerFactory:
|
||||
self.PermPool = perm_pool
|
||||
|
||||
# 全局工厂单例
|
||||
factory: rawptr[CompilerFactory] = None
|
||||
factory: CompilerFactory* = None
|
||||
Reference in new issue
Block a user