fix(tpv): 修正 REnum 表按名查找与 match 分派,恢复 str() 指针强转
str() 对整数(sizet/i64)走 snprintf 十进制格式化(Python 语义),不是 i8* 强转;用它读 sizet|t.CPtr 联合表元素再 strcmp 永不相等 => _is_renum_class_name 恒 0、变体名查不到(__types.vp:407 bits / :159 Void 根因)。IR 实证 output/a8891afb66d3eda4.text.ll L5551-5558。 - ClassGenEnum: RenumClassNames/RenumVariantNames 读侧统一改 (str)(t.CVoid(x, t.CPtr));新增 _is_renum_by_entry 与 RenumTableDump;REnum 注册静默早退改 fail-fast - MatchGenMixin/CallGenMixin: match 分派 2a/2b 与变体构造入口并上 by_entry 判据 - TypeGenResolve: 泛型下标 Phase B 解析不出特化时 fail-fast - CallGenProp: 泛型特化名末段按括号外点切分 - CompilerFactory/ClassGenBase: REnum 注册表改挂编译期单例 - ClassGenDef: CEnum/REnum 分派歧义 fail-fast
This commit is contained in:
1 parent
e0e024ee93
commit
eef84657a1
10 files changed
+318
-30
No files matched your search
@@ -136,8 +136,10 @@ class MatchGenMixin:
|
||||
trans.SymTab, nm.id)
|
||||
entry_annot: str = self.Gen.VarGen.var_annot_class_name(entry)
|
||||
if entry_annot is not None \
|
||||
and self.Gen.ClassGenEnum._is_renum_class_name(
|
||||
entry_annot) != 0:
|
||||
and (self.Gen.ClassGenEnum._is_renum_class_name(
|
||||
entry_annot) != 0
|
||||
or self.Gen.ClassGenEnum._is_renum_by_entry(
|
||||
entry_annot) != 0):
|
||||
is_renum = 1
|
||||
renum_name = entry_annot
|
||||
subject_ptr = self.Gen.VarGen.lookup_var(trans.SymTab, nm.id)
|
||||
@@ -159,7 +161,8 @@ class MatchGenMixin:
|
||||
and pat.kind() == ast.ASTKind.MatchClass:
|
||||
rnm: str = self._extract_renum_name_from_cls(pat)
|
||||
if rnm is not None \
|
||||
and self.Gen.ClassGenEnum._is_renum_class_name(rnm) != 0:
|
||||
and (self.Gen.ClassGenEnum._is_renum_class_name(rnm) != 0
|
||||
or self.Gen.ClassGenEnum._is_renum_by_entry(rnm) != 0):
|
||||
is_renum = 1
|
||||
renum_name = rnm
|
||||
if subject_ptr is None:
|
||||
|
||||
Reference in new issue
Block a user