The Cx project just had its most significant update yet, pushing over 25 non-merge commits onto submain. Let's break down what's been accomplished: the closing of four major blockers, the removal of the old AST interpreter, substantial backend IR progress reaching Stage 3, and the expansion of our test suite to ensure stability.
Four hard blockers knocked out
Getting these blockers cleared has been pivotal. First up, the f64 type keyword (commit 7c1768d) has traversed the entire pipeline, from lexer to runtime, confirmed by test t55. This paves the way for the numeric functionalities in our 0.1 release.
Next, const declarations (a7ece34) arrived with literal-only initializers. We've also imposed a restriction against reassignment, covered by tests t56 and t57. Along for the ride is the pub keyword, marking a step forward for export visibility.
The new value-producing when (d24b462) means when blocks are now usable as expressions—a major flexibility gain shown effective in test t59.
Lastly, when block-body arms (e0f989e) have moved from a gap to a verified feature (test t58 backs this up). Each feature is live and tested with no regressions in sight.
Saying goodbye to the old AST interpreter
The burden of maintaining a synced parallel execution path via the old AST interpreter is now lifted. The execution path (eval_expr ~314 lines, run_stmt ~462 lines) was axed in commit cdffec7. This means about 790 lines of dead code were removed from runtime.rs. Additional cleanups followed, with dead code like FuncDef and friends getting the boot, making the codebase leaner.
Full-speed-ahead code quality
This sprint was more than a cleanup; it was refinement. Function bodies shifted to Arc storage (0c0cb8a) to eliminate unnecessary clone overhead. Reducing redundancy, semantic_type_to_ast was streamlined with a proper From for Type implementation.
We merged print_value and print_value_inline into one value_to_string function (878029a).
Two macros, unsupported! and unsupported_type! (5819185, 14c63e5), optimized 35 match arms. Similarly, sem_err! (f8e021d) decreased 51 SemanticError constructions to concise one-liners.
Another noteworthy addition is SemanticType::Void (642a327), enabling void function calls to type-check correctly through semantics and IR.
Backend IR: Elevating function call logic
Backend advancements are noteworthy. Phase 6 Stage 2b (a6d7701) introduced direct function call lowering, complete with validation mechanisms in ir/lower.rs. Moving swiftly to Phase 6 Stage 3 (ee2c357), cross-function call validation is now solid, resolving callees and verifying function signatures comprehensively.
An IR pretty printer is queued up in src/ir/printer.rs, offering a textual representation for debugging—a critical tool for developers that's already in development and under testing.
Integrating the progress
PRs #9 through #14 have aligned main with submain as of 642a327, setting the stage for the next pushes. Yet, there are three commits still residing locally: two related to Phase 6's different stages and one involving documentation cleanup.
The test matrix renumbering (d8cf3ef) closed duplicate issues and filled gaps. We also tidied up with ample housekeeping: stale files, leftover branches, gitignore contradictions, and unused worktrees were removed, tuning the project for more efficient progress.
What's on the horizon
Top priority remains the IR printer—it's the key piece yet to be committed, essential for stable backend debugging. As the phase nears an end, the on-deck IR lowering objectives include loops, when blocks, and structs. Beyond these, the roadmap targets multi-file imports, the fleshed-out error model, transitioning print to a function, and solidifying UTF-8. Of those, multi-file imports loom largest for completion before the 0.1 release.
Follow the Cx language project:
- Website: cx-lang.com
- GitHub: github.com/COMMENTERTHE9/Cx_lang
- Dev.to: dev.to/commenterthe9
- Bluesky: thecomment.bsky.social
- Twitter/X: @commenterthe9
Originally published at https://cx-lang.com/blog/2026-03-22
Top comments (0)