(&self, subdir: &str, stem: &str, extension: &str, bytes: &[u8])
| 674 | if stack.iter().any(|m| m == name) |
| 675 | || stack_keys.iter().any(|key| key == &identity) |
| 676 | || stack_sources.iter().any(|seen| seen == source) |
| 677 | { |
| 678 | // The qualified module system forbids cycles; the kernel's flat build (mangling off) |
| 679 | // tolerates them, since separate compilation only needs each module's interface. |
| 680 | if self.mangle_in_closure { |
| 681 | stack.push(name.to_owned()); |
| 682 | return Err(CompilationError::FreestandingErrors(vec![format!( |
| 683 | "cyclic import: {}", |
| 684 | stack.join(" -> ") |
| 685 | )])); |
| 686 | } |
| 687 | return Ok(()); |
| 688 | } |
| 689 | stack.push(name.to_owned()); |
| 690 | stack_keys.push(identity); |
| 691 | stack_sources.push(source.to_owned()); |
| 692 | |
| 693 | let module_imports = hll_to_ir::imports::collect_module_imports(source) |
| 694 | .map_err(|msg| CompilationError::FreestandingErrors(vec![msg]))?; |
| 695 | for (_alias, path) in module_imports { |
| 696 | let resolved = self |
no outgoing calls
no test coverage detected