Array slices for memory and storage arrays.
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
In 0.6.0 we implemented array slices for dynamic calldata arrays.
We should also support them at least for dynamic memory arrays and maybe even for dynamic storage arrays. This will require more involved changes, though, since while calldata array slices and dynamic calldata arrays have the exact same stack layout and type conversion is a no-op, this won't be the case for memory and storage.
We could also think about the case of static arrays combined with slicing.
Contributor guide
Research direction
Start by locating the dynamic calldata array-slice implementation introduced in Solidity 0.6.0 and compare its assumptions with dynamic memory and storage arrays. Clarify whether static arrays are also in scope; done means the agreed array-slice cases are supported with corresponding validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100