argotorg / argotorg/solidity

Reserve keywords and remove identifier exceptions for 0.9.0

Open
#14,770 9 comments 0 reactions 0 assignees View on GitHub
breaking change :warning: low effort low impact must have eventually
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

In this release cycle we had to introduce a bunch parser hacks to avoid breaking existing code:
- In order to introduce new Yul opcodes in a non-breaking way, we had to mark them as exceptions for older EVM versions [in `createReservedIdentifiers()`](https://github.com/ethereum/solidity/blob/v0.8.27/libyul/backends/evm/EVMDialect.cpp#L159-L167):
- `basefee`
- `prevrandao`
- `tstore`
- `tload`
- `blobbasefee`
- `blobhash`
- `mcopy`
- `clz`
- `slotnum`
- Existing builtins have not been made reserved yet
- `memoryguard`
- New keywords needed for storage layout syntax (#597):
- `at`
- `layout`
- New keywords needed for transient storage (#15007)
- `transient`
- Other identifiers that should become keywords:
- `error`
- `super`
- `this`
- `leave` (in Yul)

In the next breaking release the exceptions should be removed and keywords added.

Contributor guide

Open the contributing guide

Research direction

Start in libyul/backends/evm/EVMDialect.cpp at createReservedIdentifiers(), where several identifiers are currently exceptions for older EVM versions. Trace the parser and keyword handling for the listed Yul opcodes and Solidity identifiers, then remove the exceptions and reserve the requested keywords for the 0.9.0 breaking release. Done means the listed names are treated consistently as reserved keywords without preserving the old identifier exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.