Initial commit: WAFER (WebAssembly Forth Engine in Rust)
Optimizing Forth 2012 compiler targeting WebAssembly with IR-based compilation pipeline, multi-typed stack inference, subroutine threading, and JIT/consolidation modes. Rust kernel with ~35 primitives and Forth standard library for core/core-ext word sets.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
//! Optimization passes for WAFER's IR.
|
||||
//!
|
||||
//! Each pass is a function `Vec<IrOp> -> Vec<IrOp>`, composable in sequence:
|
||||
//! 1. Constant folding
|
||||
//! 2. Strength reduction
|
||||
//! 3. Peephole optimization
|
||||
//! 4. Inlining
|
||||
//! 5. Dead code elimination
|
||||
//! 6. Stack-to-local promotion
|
||||
|
||||
// TODO: Step 11 - Optimization pass implementations
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn placeholder() {
|
||||
// Optimizer tests will be added in Step 11
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user