selfhost: introduce using-based imports for compiler/parser/tools; keep includes temporarily. llvm: add PHI wiring JSON trace + unit/integration tests; fast test suite extended. runner: split selfhost helpers, small cleanups.

This commit is contained in:
Selfhosting Dev
2025-09-18 13:35:38 +09:00
parent 3fe908eb0d
commit 951a050592
49 changed files with 644 additions and 287 deletions

View File

@ -27,6 +27,8 @@ pub(crate) fn pop_loop_context(builder: &mut super::MirBuilder) {
}
/// Peek current loop header block id
#[allow(dead_code)]
#[allow(dead_code)]
pub(crate) fn current_header(builder: &super::MirBuilder) -> Option<BasicBlockId> {
builder.loop_header_stack.last().copied()
}
@ -37,11 +39,15 @@ pub(crate) fn current_exit(builder: &super::MirBuilder) -> Option<BasicBlockId>
}
/// Returns true if the builder is currently inside at least one loop context.
#[allow(dead_code)]
#[allow(dead_code)]
pub(crate) fn in_loop(builder: &super::MirBuilder) -> bool {
!builder.loop_header_stack.is_empty()
}
/// Current loop nesting depth (0 means not in a loop).
#[allow(dead_code)]
#[allow(dead_code)]
pub(crate) fn depth(builder: &super::MirBuilder) -> usize {
builder.loop_header_stack.len()
}