huge refactor, can now define structs out of order

This commit is contained in:
2025-04-11 01:57:10 -04:00
parent f6a6761262
commit 31c16a263b
24 changed files with 765 additions and 566 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use crate::{
compiler::{arch::riscv::Reg, debug::DebugInfo, UnlinkedFunction, UnlinkedProgram},
ir::{
arch::riscv64::{RV64Instruction as AI, RegRef},
IRLInstruction as IRI, IRLProgram, Len, Size,
LInstruction as IRI, LProgram, Len, Size,
},
};
@@ -47,7 +47,7 @@ fn mov_mem(
}
}
pub fn compile(program: &IRLProgram) -> UnlinkedProgram<LI> {
pub fn compile(program: &LProgram) -> UnlinkedProgram<LI> {
let mut fns = Vec::new();
let mut data = Vec::new();
let mut dbg = DebugInfo::new(program.labels().to_vec());
+2 -2
View File
@@ -7,8 +7,8 @@ mod target;
use arch::riscv;
pub use program::*;
use crate::ir::IRLProgram;
use crate::ir::LProgram;
pub fn compile(program: &IRLProgram) -> UnlinkedProgram<riscv::LinkerInstruction> {
pub fn compile(program: &LProgram) -> UnlinkedProgram<riscv::LinkerInstruction> {
arch::riscv::compile(program)
}