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
ExpressionSimplifiersubstitutes 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