TRON Solidity compiler 0.8.22 is fully compatible with Ethereum Solidity 0.8.22.
Major changelog from Ethereum
IMPORTANT NOTE:
This release deprecates support for EVM versions older than Constantinople for the reason of ruling out the need to maintain multiple complex code paths or workarounds for ancient EVM versions. In case you rely on the support for such EVM versions, please reach out to us.
Notable Features:
- Unchecked loop increments
- Adding support for importing EVM Assembly JSON (experimental)
- Adjusting Yul optimizer to rematerialize zero literals
Changelog
Language Features:
- Allow defining events at file level.
Compiler Features:
- Code Generator: Remove redundant overflow checks of certain
for
loops when the counter variable cannot overflow. - Commandline Interface: Add
--no-import-callback
option that prevents the compiler from loading source files not given explicitly on the CLI or in Standard JSON input. - Commandline Interface: Add an experimental
--import-asm-json
option that can import EVM assembly in the format used by--asm-json
. - Commandline Interface: Use proper severity and coloring also for error messages produced outside of the compilation pipeline.
- EVM: Deprecate support for "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.
- Parser: Remove the experimental error recovery mode (
--error-recovery
/settings.parserErrorRecovery
). - SMTChecker: Support user-defined operators.
- Yul Optimizer: If
PUSH0
is supported, favor zero literals over storing zero values in variables. - Yul Optimizer: Run the
Rematerializer
andUnusedPruner
steps at the end of the default clean-up sequence.
Bugfixes:
- Code Generator: Fix output from via-IR code generator being dependent on which files were discovered by import callback. In some cases, a different AST ID assignment would alter the order of functions in internal dispatch, resulting in superficially different but semantically equivalent bytecode.
- NatSpec: Fix internal error when requesting
userdoc
ordevdoc
for a contract that emits an event defined in a foreign contract or interface. - SMTChecker: Fix encoding error that causes loops to unroll after completion.
- SMTChecker: Fix inconsistency on constant condition checks when
while
orfor
loops are unrolled before the condition check. - Yul Optimizer: Fix replacement decisions during CSE being affected by Yul variable names generated by the compiler, resulting in different (but equivalent) bytecode in some situations.
AST Changes:
- AST: Fix wrong initial ID for Yul nodes in the AST.