stage2 大量优化代码使其自举编译时间大幅缩短

This commit is contained in:
zzy committed 2026-09-20 09:33:20 +08:00
1 parent e02b0c633a
commit 846f441e3a
38 files changed
+2418 -835

No files matched your search

+1 -5
View File
@@ -87,11 +87,7 @@ fn drop(self: *DefTable) {
// id 0 与越界均返回 null(对应 stage1 spl_def_node)。
fn node(self: *DefTable, id: usize): *DefNode {
if id == 0 || id >= self.table.len { ret null; }
match Vec.get(&self.table, id) {
.Ok(ptr) => { ret ptr as *DefNode; },
.Err(error) => { ret null; },
}
ret null;
ret (self.table.data as *DefNode) + id;
}
fn count(self: *DefTable): usize {