mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Skip resolving Keccak if AST contains msize.
Also a refactoring changing `m_optimizeMLoad` to `m_containsMSize`.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
sstore(0, msize())
|
||||
mstore(0, 10)
|
||||
// Keccak-256 should not be evaluated because of the msize.
|
||||
// Even though, though the code is likely equivalent,
|
||||
// we skip steps if `msize` is present
|
||||
let val := keccak256(0, 32)
|
||||
sstore(1, val)
|
||||
}
|
||||
// ----
|
||||
// step: loadResolver
|
||||
//
|
||||
// {
|
||||
// let _1 := msize()
|
||||
// let _2 := 0
|
||||
// sstore(_2, _1)
|
||||
// mstore(_2, 10)
|
||||
// sstore(1, keccak256(_2, 32))
|
||||
// }
|
||||
Reference in New Issue
Block a user