2020-11-12 14:29:08 +00:00
|
|
|
contract c {
|
|
|
|
uint spacer1;
|
|
|
|
uint spacer2;
|
|
|
|
uint[20] data;
|
|
|
|
function fill() public {
|
|
|
|
for (uint i = 0; i < data.length; ++i) data[i] = i+1;
|
|
|
|
}
|
|
|
|
function clear() public { delete data; }
|
|
|
|
}
|
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-02-12 12:45:15 +00:00
|
|
|
// compileViaYul: also
|
2020-11-12 14:29:08 +00:00
|
|
|
// ----
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 1
|
2020-11-12 14:29:08 +00:00
|
|
|
// fill() ->
|
2021-05-18 13:39:08 +00:00
|
|
|
// gas irOptimized: 465878
|
|
|
|
// gas legacy: 471460
|
|
|
|
// gas legacyOptimized: 467520
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 0
|
2020-11-12 14:29:08 +00:00
|
|
|
// clear() ->
|
2021-01-08 03:45:19 +00:00
|
|
|
// storageEmpty -> 1
|