stage2 修复大量AI生成的风格问题 stage1 修复对于vm abi的错误生成

This commit is contained in:
zzy committed 2026-10-03 15:05:55 +08:00
1 parent 0e38858785
commit 76f980654c
40 files changed
+619 -938

No files matched your search

+3 -5
View File
@@ -1,8 +1,7 @@
// Expect retcode = 0
// 内建(intrinsic)注册表(移植自 stage1/spl_intrin.c)。表是数据:按 kind 查
// 描述信息,按名字/字段/`as` 转换规则反查 kind。新增内建只改 info_at,
// 不改 sema 逻辑(对应 SPL.md 的 @/# 扩展点)。
// 内建注册表:按 Intrin 查描述信息,按名字/字段/`as` 规则反查 Intrin。新增内建只改
// info_at,不改 sema 逻辑(SPL.md 的 @/# 扩展点)。
type .{ .ByteView } = @import("utils/byte_view.spl");
type TypeTable = @import("./type_table.spl");
@@ -63,7 +62,7 @@ fn kind_is(a: LangKind, b: LangKind): bool {
ret @enum2int(a) == @enum2int(b);
}
// 与 stage1 表逐项对应(枚举顺序即 kind 数值)。
// 枚举顺序即 kind 数值(与 splc0 表一致)。
fn info_at(index: usize): IntrinInfo {
match index {
1 => {
@@ -250,7 +249,6 @@ fn lookup_cast(ir: *TypeTable, ft: usize, tt: usize): Intrin {
ret .None;
}
// ---- 测试 ----
fn test_info_table() {
var d = info(.Sizeof);