refactor: centralize box type metadata

This commit is contained in:
moe-charm
2025-09-11 04:20:28 +09:00
committed by Selfhosting Dev
parent f124731764
commit c4e1728b8e
9 changed files with 3041 additions and 1515 deletions

View File

@ -0,0 +1,27 @@
use crate::box_trait::NyashBox;
use crate::mir::ValueId;
use std::collections::HashMap;
pub struct LLVMCompiler {
values: HashMap<ValueId, Box<dyn NyashBox>>,
}
#[cfg(not(feature = "llvm"))]
mod mock;
#[cfg(not(feature = "llvm"))]
pub use mock::*;
#[cfg(feature = "llvm")]
mod real;
#[cfg(feature = "llvm")]
pub use real::*;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_llvm_module_creation() {
assert!(true);
}
}