This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Radar · Solidity · Archive · Week 42 · Oct 13 – 19, 2025

Yul Optimizer: Fixed ExpressionSimplifier edge case

Nice to knowecosystem

What changed
The optimizer now avoids generating invalid Yul code when ExpressionSimplifier substitutes expressions that contain out‑of‑scope variables.
Production impact
The source does not say.
Try it
Compile a contract that uses Yul expressions with variables that go out of scope and verify that the optimizer no longer emits errors.
Source
github.com/argotorg/solidity/releases/tag/v0.8.31-pre.1

Understand it, then run it

The Solidity compiler has an optimizer that rewrites low‑level Yul code to make it faster. Sometimes the optimizer would replace a piece of code with another that used a variable that was no longer in scope. That produced invalid Yul, which could cause the compiler to crash or emit wrong bytecode. The change in 0.8.31‑pre.1 fixes that edge case so the optimizer no longer generates such invalid code.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed