惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
爱范儿
爱范儿
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 叶小钗
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
博客园 - 司徒正美
博客园 - 【当耐特】
IT之家
IT之家

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Cx Dev Log — 2026-05-07
COMMENTERTHE · 2026-05-20 · via DEV Community

COMMENTERTHE9

JIT Backend: Cracking the Realness Code

Back-edge sealing, assert native lowering, and functional tests—sounds like just another day in the trenches. This week marks a pivotal moment in the Cx language devlog, focusing on JIT correctness and leaving the merge backlog behind for a more intriguing question. Can the JIT really run Cx programs as intended?

No-Panic Guarantee on Valid IR

With PR #101 (CX-50), we see the JIT backend promising not to panic on any IR that successfully passes validate_module. Closing unsafe paths is key here:

  1. Back-edge Sealing Panic was a thorn in the side as Cranelift panicked on loops targeting a previously sealed block, now resolved by deferring seal_all_blocks() until all instructions are emitted.
  2. Float Arithmetic on Integer Ops is no longer a surprise party for the wrong guests. F64 operations mistakenly handed off to integer ops like iadd are cut off with an UnsupportedConstruct.
  3. Float Comparison Guard ensures proper type-checking, verifying builder.func.dfg.value_type() before deploying icmp.

This patch also corrects three missing read_only fields in BlockParam, pushed by previous CX-40 changes. Ending with 197 successful tests and an augmented host_boundary.rs by 258 lines, this work guarantees not just correctness in theory but secure invocation in practice.

Assert and Assert_eq Lower Natively

CX-48 advances by letting assert and assert_eq cut out the middleman, lowering directly through IR and Cranelift. Enter IrTerminator::Trap—a new, no-nonsense terminator—causing unconditional aborts.

Here’s how:

  • assert(cond): Forms a two-branch CFG, branching on condition, trapping on fail.
  • assert_eq(a, b): Uses Compare(Eq) with a similar branch-and-trap pattern.

With Trap, execution stops dead on failure instead of rambling through with control transfers. This translates into +588 lines across six files and a total of 204 tests in that branch.

First JIT Parity Baseline

The CX-51 change introduces a differential harness meant to push all interpreter tests through the JIT. The result: 23 passing, 97 skipping unsupported constructs, and zero parity failures out of 120 fixtures.

Achieving zero parity failures is the holy grail of these tests. It shows alignment with the interpreter across board, even as many constructions aren't JIT-ready. As more capabilities light up, the JIT scoreboard—tracking 23 successful JIT fixtures—will evolve. Meanwhile, it eliminates the silent exit zero faux pas, ensuring failure codes aren't lost in the cracks.

Determinism Testing

Then there’s CX-49, bringing determinism testing into play with a dozen tests for re-compiling IrModule and checking for identical results. Testing covers simple to complex constructs, from ConstInt to multiple functions. A formal spec, docs/backend/cx_jit_determinism.md, backs this up.

Achieving JIT predictability per session may not sound groundbreaking, but it feels like securing a future where debugging doesn't dig into recurring non-determinism bugs, making life simpler down the line.

Branch Management at Scale

Not forgetting steady hands, CX-45 and CX-44 calmly steered through rebasing and cleaning six branches. Conflicts speckled across host_boundary.rs suggest a typical day, each branch passing through audits and tests, showing 196 to 201 tests per branch.

Managing this highlights the complexity of 12+ active branches, but submain's trajectory strongly suggests steady progress stands ahead of a main merge delay, now expanded by 16+ non-merge commits.

What's Next

As the task turns towards merging six, rebased human reviews into submain, closing multiple phases, strides should soon include integrations of today’s latest branches (CX-47, CX-48, CX-49, CX-51). The real roadblock’s the submain-to-main merge—looming large and risky if ignored much longer.

Method call lowering and when block support—as part of Phase 11—remain in waiting, cast aside while the JIT backend deserves undivided attention. Assertive lowering of assert and assert_eq is progress, yet, handfuls of runtime intrinsics—print, println, printn, read, and input—stay untamed.

With 23 out of 120 fixtures JIT-ready, the path's clear to closing even more as pending branches weave into the main. Onward to closing those gaps:


Follow the Cx language project:

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