This commit is contained in:
Nilton Constantino
2026-02-02 17:52:20 +00:00
parent f80cb64f66
commit 66a77709f0
50 changed files with 806 additions and 225 deletions
+1 -1
View File
@@ -5,8 +5,8 @@
//! easy to lower into VM-specific bytecode.
use crate::common::spans::Span;
use crate::ir_vm::types::{ConstId, TypeId};
use crate::ir_core::ids::FunctionId;
use crate::ir_vm::types::{ConstId, TypeId};
/// An `Instruction` combines an instruction's behavior (`kind`) with its
/// source code location (`span`) for debugging and error reporting.
+4 -4
View File
@@ -29,15 +29,15 @@ pub mod module;
pub mod instr;
pub mod validate;
pub use instr::{Instruction, InstrKind, Label};
pub use module::{Module, Function, Global, Param};
pub use types::{Type, Value, GateId, ConstId, TypeId};
pub use instr::{InstrKind, Instruction, Label};
pub use module::{Function, Global, Module, Param};
pub use types::{ConstId, GateId, Type, TypeId, Value};
#[cfg(test)]
mod tests {
use super::*;
use crate::ir_core::ids::{ConstId, FunctionId};
use crate::ir_core::const_pool::{ConstPool, ConstantValue};
use crate::ir_core::ids::{ConstId, FunctionId};
use serde_json;
#[test]
+2 -2
View File
@@ -4,10 +4,10 @@
//! The IR is a higher-level representation of the program than bytecode, but lower
//! than the source code AST. It is organized into Modules, Functions, and Globals.
use crate::ir_vm::instr::Instruction;
use crate::ir_vm::types::Type;
use crate::ir_core::const_pool::ConstPool;
use crate::ir_core::ids::FunctionId;
use crate::ir_vm::instr::Instruction;
use crate::ir_vm::types::Type;
use serde::{Deserialize, Serialize};
/// A `Module` is the top-level container for a compiled program or library.