TermiNexus
83d46dd646
fix(gen): 装饰器标记支持 + len 分发 + 跨模块调用修复
- _is_enum_class/_is_union_class/_is_renum_class 支持 @t.CEnum/@t.CUnion/
@t.REnum 装饰器形式(此前只认继承基类,装饰器形式 Color 未注册枚举,
Color.GREEN 落到跨模块 CDefine FATAL)
- forward_declare_functions/translate_function_def 支持 @t.CExport/@t.CExtern/
@t.State 函数存储装饰器(对齐 TPC _extract_decorator_storage_flags);
用 HandlesClassDef._has_decorator 委托(Mixin @t.NoVTable 静态绑定,
self. 跨类调生成不存在的 FuncGenMixin._has_decorator → 链接 undefined)
- len() 内建对结构体对象分发 __len__(此前恒 strlen 读对象首字段垃圾长度)
- 静态调用检测 elif:module.ClassName.static_method 形态;零参 @staticmethod
去掉 head is None 守卫;_translate_property_call 按形参类型 coerce 实参
- translate_compare 指针判空(ptr != 0/== 0)跳过 __eq__/__ne__ 重载走
icmp null;同模块类无此 dunder 干净返回 None 防幽灵 call;/ → __truediv__
2026-08-11 18:42:04 +08:00
..
2026-08-11 18:42:04 +08:00
2026-08-08 10:31:44 +08:00
2026-08-10 18:09:23 +08:00
2026-07-30 21:56:19 +08:00