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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
量子位
S
SegmentFault 最新的问题
博客园 - 聂微东
博客园 - 【当耐特】
J
Java Code Geeks
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
V
V2EX
人人都是产品经理
人人都是产品经理
博客园 - Franky
罗磊的独立博客
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

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-04-26
COMMENTERTHE · 2026-04-27 · via DEV Community

COMMENTERTHE9

The IR backend has entered Phase 11. This shift brings unary expression lowering into the spotlight, with its recent landing on submain introducing negate support for integers and floats alongside boolean not. With four new tests backing up these additions, it echoes more than just syntax tweaks. Meanwhile, behind-the-scenes adjustments continue—an essential cargo test fix rectifies issues left lingering from a prior warning cleanup that had temporarily derailed our test suite. Both of these updates currently reside on submain, leaving the main branch untouched—an evolving situation that keeps many of us watching closely.

Unary Expression Lowering

Diving into unary expression lowering, Phase 11 adds a new match arm to src/ir/lower.rs. We're talking +140/-1 lines, primarily handling two unary operators. First up is Op::Minus. The approach for -x lowering is straightforward: transform it to 0 - x. This approach leverages existing subtraction infrastructure instead of introducing a new Neg IR instruction, maintaining efficiency by keeping the IR instruction set compact. For int and float, it's a matter of producing ConstInt or ConstFloat zero, followed by emitting a Binary::Sub instruction.

For Op::Not, it's all about converting boolean negation into a value == 0 check through a Compare::Eq against zero, returning a Bool. Unsupported operators? They trigger a clean LoweringError instead of causing panic.

To assure robustness, four Rust-level tests map out this action. They don't just check if lowering functions succeed without errors; each test targets the IR's structural output: lowers_unary_negate_int, lowers_unary_negate_float, lowers_unary_not_bool, and rejects_unsupported_unary_op. Although a scoped addition, it marks our shift beyond statement-level constructs, nudging us toward comprehensive expression handling. But note, expressions like ArrayLit, Index, MethodCall, StructLit, HandleVal, HandleDrop, and Range await their turn in the next phases.

Cargo Test Fix

Past oversights in the warning cleanup reform led to a mini disaster—vanishing analyze_program from semantic.rs without updating its lingering test references. As you might imagine, this did not sit well. Commit db2ee08 emerges as the hero, implementing a 27-line test-only wrapper. This wrapper crafts a single-file ResolvedProgram, ensuring analyze_resolved_program continues to run smoothly.

Equally notable is the fixing of CRLF line ending issues across six expected_output files, quelling any lingering mismatches during Windows-based tests. After these revisions, the cargo test suite bounces back to form with 123 passes and one known holdout—an unyielding IR backend test from Phase 10's legacy.

Roadmap v4.8 to v4.9

Our roadmap sees substantive updates. Checkmarks now grace nine hard blockers, substantiated by submain evidence. These cover diverse areas from basic test runners to enforcing integer overflow. All labeled as pending merger to main, sitting patiently for that final nod.

Phase 10 is out of our hair, paving the way for Phase 11's breakthroughs on submain. Known gaps are steadily closing; struct field type checking and integer overflow now find places as resolved on submain. Yet, an undeniable submain integration gap—19 commits ahead of main—looms large.

The Merge Gap

So here we are—the elephant that's commandeering the room. Submain is 19 commits ahead, with a staggering, unchallenged test matrix distinction. Submain's 117/117 stands against main's 78/78. It's the unmerged reality causing a grand chasm of 39 tests between the two. The ever-pending submain-to-main merging remains perched atop our priority list; delays only compound the difficulty of future integrations. Submain's ventures have undeniable value; however, watching its divergence stripe the horizon in bolder strokes daily is concerning.

What's Next

Despite recent efforts, submain-to-main merging and log branch cleanups remain elusive. Yet, moving forward, Phase 11 expression lowering needs to weave through the remaining unsupported kinds: ArrayLit, Index, MethodCall, StructLit, HandleVal, HandleDrop, and Range—prioritizing areas that synergize our approach. On another note, addressing the lone cargo test failure would crown the Rust test suite's fully green visibility. As for the mounting 25 daily-log branches, periodic operational cleanup soon feels imperative.


Follow the Cx language project:

Originally published at https://cx-lang.com/blog/2026-04-26