DEV Community

COMMENTERTHE9
COMMENTERTHE9

Posted on • Originally published at cx-lang.com

Cx Dev Log — 2026-05-20

The JIT backend just saw its most significant leap forward with the latest commits hitting submain. We've locked in method-call lowering, tackled print argument widening, and fixed some key differential harness issues. This single day moved parity forward: from 99 PASS and 83 SKIP to 110 PASS with 72 SKIP, all without hitting any PARITY_FAILs across the board of 182 fixtures.

Method-call lowering: synthesis over duplication

We hit a big milestone with method-call lowering — a major code change landed that replaced our previous stub with full end-to-end functionality. The main decision was whether MethodCall should be treated as a standalone process duplicating existing Call logic or if it should leverage existing infrastructure. We opted for delegation: at lower.rs:1791, the MethodCall now converts the operation into a Call, using the receiver as the first argument, diving into existing logic rather than creating new pathways. This keeps method dispatch as a streamlined translation layer rather than a cumbersome parallel process.

With this update, our ingestion process now keeps alias parameters intact, registering methods with modified names ({Struct}${method}) in the signature table. Thanks to this, new test cases (t175/t176/t177) for basic implementation, return paths, and multi-alias methods passed seamlessly.

The same commit tackled literal-width narrowing. It highlighted how Numeric literals matched against typed peers in operations. Instead of a patchwork fix for MethodCall, the solution incorporated a comprehensive surface-level approach: aiding assert_eq peer narrowing, across comparative operators, and MethodCall arguments with the insert_cast_if_needed function. A dedicated fixture (t178) confirms this refinement: ordering comparisons on narrow integers now clear on all fronts. This commit improved parity by +16 PASS.

Print argument widening

One crucial gap was within our cx_printn runtime intrinsic, which was limited to I64. Enter route_print_arg: this new helper extends I8/I16/I32 to I64 through casting and guides Bool/TBool to a dedicated cx_print_bool external. Our approach targets distinct type families rather than one-size-fits-all — integers expand into cx_printn, booleans take their intrinsic path, and F64/I128 await attention post-version 0.1.

We saw immediate resonance in these updates: a +11 PASS jump with no steps back. Fixtures t01 and t115 succeeded at last, and bool outputs aligned with interpreter outcomes. Gaps still exist but aren't our intrinsic's fault — they rest with other structures downstream, like in t41 and t109.

Harness hardening

Our differential testing setup just got sturdier. Two fixes have shored up real vulnerabilities.

The first ripples into our process as it closes hard blocker H1. Previously, a non-JIT binary via standard cargo build would bypass all parity fixtures as SKIPs. Now, assert_jit_capable() assesses the binary at initialization, halting in 30ms if JIT support is absent. This correction erases a swath of misleading CI successes.

The second tackles H5 — a hiccup in metric consistency across four successive commits. Despite reporting 94/88, actual table values were 99/83. The solution? An AUTHORITATIVE TOTALS line using the same accumulators as the detailed table — ensuring cut-and-dry truth, avoiding manual errors.

0.1 readiness audit

Two audit commitments embedded per-item verification directly into the roadmap file using HTML comments. Reviewers can nod along with <!-- audit: VERIFIED --> or spot <!-- audit: DRIFTED --> marks as the scorecards apply. Verdict from these audits? We're not ready for 0.1. Despite conquering H1, H2, and H5 today, hurdles like H3 (when-block lowering) and H4 (feature-branch parity items CX-91/CX-94/CX-34) loom.

Interesting discovery: the Cast category's green status in parity reports isn't what it seems. Recent PASSes stem from narrowing touches, not a completed CX-91 Cast JIT implementation.

What's next

Crossing off three blockers — H1, H2, H5 — leaves us grappling with H3 and H4. The CX-233 while-in loop lowering branch is fully fleshed out, tested, yet still waiting in the wings to merge into submain for the third day. When-block lowering (H3) holds back three SKIP cases and is the last blocker squarely in our domain.

Meanwhile, the submain-to-main gap has ballooned to 179 commits, pegged as overdue in daily logs spanning two weeks. The rising cost of integration could soon outweigh remaining feature quests.

Our JIT parity sits at 110/182 (60.4%), but the SKIPs that remain are more from specific construct needs rather than missing fundamental blocks. While 0.1 readiness remains elusive, the path forward is not.


Follow the Cx language project:

Originally published at https://cx-lang.com/blog/2026-05-20

Top comments (0)