You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Solidity, the maximum stack depth is 1024 items, with each item being a 256-bit word. Additionally, the EVM can only access stack items that are up to 16 slots away from the top-most slot. Currently, when we need to access an item deeper than this limit, we first attempt to rematerialize slots that can be rematerialized (see #718), and if that fails, we throw an error.
Instead of failing, we should spill the slot using mstore and reload it later via mload. Ideally, we can reuse the spill/reload logic from the register allocation process, if applicable.
Additionally, we should make the stack depth threshold for spilling configurable, so we can evaluate whether it's more efficient to avoid fully occupying the stack.
The text was updated successfully, but these errors were encountered:
In Solidity, the maximum stack depth is 1024 items, with each item being a 256-bit word. Additionally, the EVM can only access stack items that are up to 16 slots away from the top-most slot. Currently, when we need to access an item deeper than this limit, we first attempt to rematerialize slots that can be rematerialized (see #718), and if that fails, we throw an error.
Instead of failing, we should spill the slot using
mstore
and reload it later viamload
. Ideally, we can reuse the spill/reload logic from the register allocation process, if applicable.Additionally, we should make the stack depth threshold for spilling configurable, so we can evaluate whether it's more efficient to avoid fully occupying the stack.
The text was updated successfully, but these errors were encountered: