solidity
solidity copied to clipboard
Improve memory management/allocation
The current feeling is that for this to work nicely, we need a notion of lifetime for memory objects. For gas-efficiency reasons, we want this lifetime to be determined at compile-time. Because of that, we are trying to see if rust's model of lifetime tracking / borrow-checking is working for us.
The first draft is considering an intermediate language that makes use of typed yul that achieves this goal. If this works out, we probably need to pull this up to the Solidity level, which means we need proper reference tracking for Solidity. Related: https://github.com/ethereum/solidity/issues/13323
More details can be found at notes.ethereum.org