stage2 修复大量AI生成的风格问题 stage1 修复对于vm abi的错误生成
This commit is contained in:
1 parent
0e38858785
commit
76f980654c
40 files changed
+619
-938
No files matched your search
+3
-9
@@ -1,8 +1,7 @@
|
||||
// Expect retcode = 0
|
||||
|
||||
// 属性注册表与属性节点(移植自 stage1/spl_attr.c)。注册表是数据:内置属性
|
||||
// 在 register_builtins 里登记,查找按 (ns, name)。节点记录命中信息 + 实参。
|
||||
// 新增属性只加注册项,不改 sema 逻辑(对应 SPL.md 的 @/# 扩展点)。
|
||||
// 属性注册表:内置属性在 register_builtins 登记,按 (ns, name) 查找。新增属性只加
|
||||
// 注册项,不改 sema 逻辑(SPL.md 的 @/# 扩展点)。
|
||||
|
||||
type .{ .Error } = @import("utils/error.spl");
|
||||
type .{ .Vec } = @import("utils/vec.spl");
|
||||
@@ -163,10 +162,7 @@ fn alloc(self: *Attr, info_index: usize, args: Vec): usize {
|
||||
}
|
||||
|
||||
fn registry_add(self: *Attr, info: AttrInfo) {
|
||||
match Vec.push(&self.registry, &info as *u8) {
|
||||
.Ok => {},
|
||||
.Err(error) => {},
|
||||
}
|
||||
Vec.push(&self.registry, &info as *u8);
|
||||
}
|
||||
|
||||
// 返回注册表下标(>=1)或 0。
|
||||
@@ -205,7 +201,6 @@ fn register_builtins(self: *Attr) {
|
||||
registry_add(self, make_info("", "export", .Ir, .Decl, .Optional, 1, 1));
|
||||
}
|
||||
|
||||
// ---- dump(镜像 stage1 spl_attr_dump / spl_attr_dump_id)----
|
||||
|
||||
fn push_out(buf: *ByteBuffer, bytes: []u8): bool {
|
||||
match ByteBuffer.append(buf, bytes) {
|
||||
@@ -341,7 +336,6 @@ fn dump(self: *Attr, out: *ByteBuffer): bool {
|
||||
ret true;
|
||||
}
|
||||
|
||||
// ---- 测试 ----
|
||||
|
||||
fn expect_text(buf: ByteBuffer, expected: []u8) {
|
||||
var got = ByteBuffer.as_slice(buf);
|
||||
|
||||
Reference in new issue
Block a user