| 13 | let source = fs::read_to_string(&path) |
| 14 | .unwrap_or_else(|e| panic!("failed to read fixture {path:?}: {e}")); |
| 15 | let mut pipeline = CompilationPipeline::new(); |
| 16 | pipeline.set_write_artifacts(false); |
| 17 | let result = pipeline |
| 18 | .compile(&source) |
| 19 | .unwrap_or_else(|e| panic!("compilation error in {subdir}/{name}: {e}")); |
| 20 | pipeline.compile_ir_to_assembly(&result.ir_program).expect("valid IR layout") |
| 21 | } |
| 22 | |
| 23 | fn compile_inline(source: &str) -> String { |
| 24 | let mut pipeline = CompilationPipeline::new(); |
| 25 | pipeline.set_write_artifacts(false); |
| 26 | let result = pipeline.compile(source).expect("compilation failed"); |
| 27 | pipeline.compile_ir_to_assembly(&result.ir_program).expect("valid IR layout") |
| 28 | } |
| 29 | |
| 30 | // -- Store widths -------------------------------------------------------------- |