mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-23 03:47:59 +00:00
f0f344a139
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com> Signed-off-by: xermicus <cyrill@parity.io>
55 lines
946 B
Solidity
55 lines
946 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8;
|
|
|
|
/* runner.json
|
|
{
|
|
"differential": true,
|
|
"actions": [
|
|
{
|
|
"Instantiate": {
|
|
"code": {
|
|
"Solidity": {
|
|
"contract": "MSize",
|
|
"solc_optimizer": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"Call": {
|
|
"dest": {
|
|
"Instantiated": 0
|
|
},
|
|
"data": "f016832c"
|
|
}
|
|
},
|
|
{
|
|
"Call": {
|
|
"dest": {
|
|
"Instantiated": 0
|
|
},
|
|
"data": "f4a63aa5"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
*/
|
|
|
|
contract MSize {
|
|
uint[] public data;
|
|
|
|
function mSize() public pure returns (uint size) {
|
|
assembly {
|
|
size := msize()
|
|
}
|
|
}
|
|
|
|
function mStore100() public pure returns (uint size) {
|
|
assembly {
|
|
mstore(100, msize())
|
|
size := msize()
|
|
}
|
|
}
|
|
}
|