stage2 大量优化代码使其自举编译时间大幅缩短
This commit is contained in:
1 parent
e02b0c633a
commit
846f441e3a
38 files changed
+2418
-835
No files matched your search
+1
-5
@@ -44,11 +44,7 @@ fn new(): LayoutResult {
|
||||
|
||||
fn info_at(self: *Layout, id: usize): *LayoutInfo {
|
||||
if id == 0 || id >= self.infos.len { ret null; }
|
||||
match Vec.get(&self.infos, id) {
|
||||
.Ok(ptr) => { ret ptr as *LayoutInfo; },
|
||||
.Err(error) => { ret null; },
|
||||
}
|
||||
ret null;
|
||||
ret (self.infos.data as *LayoutInfo) + id;
|
||||
}
|
||||
|
||||
// 未解析或越界返回 null(对应 stage1 spl_layout_info_of)。
|
||||
|
||||
Reference in new issue
Block a user