fix(classgen): 补声明 GenericFunc* 五个类字段,修复 GenericFuncKeys 成员查找 fast-fail
This commit is contained in:
1 parent
63acb2bf4d
commit
2868798f58
1 file changed
+13
-1
@@ -131,7 +131,19 @@ novirtual class ClassGenBase:
|
||||
# 可能失效(VectorGenericTest 特化 Vector[int].__init__ 的 T.__sizeof__()
|
||||
# NameError 根因方向);注册时展平深拷贝到 stdlib,特化时从本表恢复。
|
||||
# 每槽指向一个空格分隔、NUL 结尾的 stdlib 缓冲区(如 "T" 或 "T K")。
|
||||
GenericClassTpParams: sizet*
|
||||
GenericClassTpParams: sizet*
|
||||
|
||||
# --- 泛型函数模板表(与上面 GenericClass* 同构:键 "{sha1}.{fname}" 定位
|
||||
# 模板节点/来源 SHA1/来源文件/类型参数名)。
|
||||
# 必须与其它字段一起声明在类顶——方法中间的字段注解可能被编译器当作
|
||||
# 局部声明处理,破坏 Mixin 布局/this_adjust 对齐(见 _exception_codes_tmp_count)。
|
||||
# 之前只写了 __before_init__ 里的赋值而漏了这里,导致 ClassGenGeneric
|
||||
# 上的读取触发 fast-fail:属性 'GenericFuncKeys' 在类中找不到。 ---
|
||||
GenericFuncKeys: list[str]*
|
||||
GenericFuncNodes: list[ast.FunctionDef*]*
|
||||
GenericFuncSha1s: list[str]*
|
||||
GenericFuncFiles: list[str]*
|
||||
GenericFuncTpParams: sizet*
|
||||
|
||||
# --- vtable 方法收集表(原 _g_vt_full_names/_g_vt_method_names/
|
||||
# _g_vt_parent_sha1s/_g_vt_method_count) ---
|
||||
|
||||
Reference in new issue
Block a user