mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #14469 from ethereum/push0-rematerializer
Push0 rematerializer
This commit is contained in:
commit
0fbc5cc7d3
@ -4,6 +4,7 @@ Language Features:
|
||||
|
||||
|
||||
Compiler Features:
|
||||
* Yul Optimizer: If ``PUSH0`` is supported, favor zero literals over storing zero values in variables.
|
||||
|
||||
|
||||
Bugfixes:
|
||||
|
@ -158,6 +158,10 @@ void CodeCost::operator()(Literal const& _literal)
|
||||
case LiteralKind::Number:
|
||||
for (u256 n = u256(_literal.value.str()); n >= 0x100; n >>= 8)
|
||||
cost++;
|
||||
if (valueOfLiteral(_literal) == 0)
|
||||
if (auto evmDialect = dynamic_cast<EVMDialect const*>(&m_dialect))
|
||||
if (evmDialect->evmVersion().hasPush0())
|
||||
--m_cost;
|
||||
break;
|
||||
case LiteralKind::String:
|
||||
cost = _literal.value.str().size();
|
||||
|
@ -189,12 +189,11 @@ object "C_6" {
|
||||
/// @src 0:60:101 "contract C {..."
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -188,12 +188,11 @@ object "C_6" {
|
||||
/// @src 0:60:101
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -177,12 +177,11 @@ object "C_6" {
|
||||
{
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -434,65 +434,64 @@ object "D_27" {
|
||||
mstore(_2, _1)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _3 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_3)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
/// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..."
|
||||
let _4 := datasize("C_2")
|
||||
let _5 := add(_1, _4)
|
||||
let _6 := 0xffffffffffffffff
|
||||
if or(gt(_5, _6), lt(_5, _1))
|
||||
let _3 := datasize("C_2")
|
||||
let _4 := add(_1, _3)
|
||||
let _5 := 0xffffffffffffffff
|
||||
if or(gt(_4, _5), lt(_4, _1))
|
||||
{
|
||||
/// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..."
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
/// @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..."
|
||||
datacopy(_1, dataoffset("C_2"), _4)
|
||||
if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ _3, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_5, _1)))
|
||||
datacopy(_1, dataoffset("C_2"), _3)
|
||||
if iszero(create(/** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ 0, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _1, sub(_4, _1)))
|
||||
{
|
||||
/// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..."
|
||||
let pos := mload(_2)
|
||||
returndatacopy(pos, _3, returndatasize())
|
||||
returndatacopy(pos, 0, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
let memPtr := mload(_2)
|
||||
let newFreePtr := add(memPtr, _2)
|
||||
if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr))
|
||||
if or(gt(newFreePtr, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr, memPtr))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
mstore(_2, newFreePtr)
|
||||
mstore(memPtr, 2)
|
||||
let _7 := 32
|
||||
mstore(add(memPtr, _7), "/*")
|
||||
let _6 := 32
|
||||
mstore(add(memPtr, _6), "/*")
|
||||
let memPtr_1 := mload(_2)
|
||||
let newFreePtr_1 := add(memPtr_1, 96)
|
||||
if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _6), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1))
|
||||
if or(gt(newFreePtr_1, /** @src 0:446:491 "new /// @src 0:149:156 \"new C()\"..." */ _5), /** @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..." */ lt(newFreePtr_1, memPtr_1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
mstore(_2, newFreePtr_1)
|
||||
mstore(memPtr_1, 39)
|
||||
mstore(add(memPtr_1, _7), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b)
|
||||
mstore(add(memPtr_1, _6), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b)
|
||||
mstore(add(memPtr_1, _2), shl(200, 0x2e2e2e22202a2f))
|
||||
let memPos := mload(_2)
|
||||
mstore(memPos, _7)
|
||||
mstore(memPos, _6)
|
||||
let length := mload(memPtr_1)
|
||||
mstore(add(memPos, _7), length)
|
||||
let i := _3
|
||||
for { } lt(i, length) { i := add(i, _7) }
|
||||
mstore(add(memPos, _6), length)
|
||||
let i := 0
|
||||
for { } lt(i, length) { i := add(i, _6) }
|
||||
{
|
||||
mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _7)))
|
||||
mstore(add(add(memPos, i), _2), mload(add(add(memPtr_1, i), _6)))
|
||||
}
|
||||
mstore(add(add(memPos, length), _2), _3)
|
||||
mstore(add(add(memPos, length), _2), 0)
|
||||
return(memPos, add(sub(add(memPos, and(add(length, 31), not(31))), memPos), _2))
|
||||
}
|
||||
}
|
||||
|
@ -47,31 +47,30 @@ object "D_16" {
|
||||
mstore(64, _1)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _2 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_2)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_2, _2) }
|
||||
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
/// @src 0:149:156 "new C()"
|
||||
let _3 := datasize("C_3")
|
||||
let _4 := add(_1, _3)
|
||||
if or(gt(_4, 0xffffffffffffffff), lt(_4, _1))
|
||||
let _2 := datasize("C_3")
|
||||
let _3 := add(_1, _2)
|
||||
if or(gt(_3, 0xffffffffffffffff), lt(_3, _1))
|
||||
{
|
||||
/// @src 0:96:165 "contract D {..."
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_2, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
/// @src 0:149:156 "new C()"
|
||||
datacopy(_1, dataoffset("C_3"), _3)
|
||||
if iszero(create(/** @src 0:96:165 "contract D {..." */ _2, /** @src 0:149:156 "new C()" */ _1, sub(_4, _1)))
|
||||
datacopy(_1, dataoffset("C_3"), _2)
|
||||
if iszero(create(/** @src 0:96:165 "contract D {..." */ 0, /** @src 0:149:156 "new C()" */ _1, sub(_3, _1)))
|
||||
{
|
||||
/// @src 0:96:165 "contract D {..."
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _2, returndatasize())
|
||||
returndatacopy(pos, 0, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
return(_2, _2)
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -17,12 +17,11 @@ object "D_12" {
|
||||
/// @src 0:82:175 "contract D {..."
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -19,12 +19,11 @@ object "D_8" {
|
||||
/// @src 0:82:166 "contract D {..."
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -21,101 +21,100 @@ object "C_59" {
|
||||
let _2 := 4
|
||||
if iszero(lt(calldatasize(), _2))
|
||||
{
|
||||
let _3 := 0
|
||||
if eq(0xf8eddcc6, shr(224, calldataload(_3)))
|
||||
if eq(0xf8eddcc6, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_3, _3) }
|
||||
let _4 := 32
|
||||
if slt(add(calldatasize(), not(3)), _4) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _3 := 32
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(0, 0) }
|
||||
let offset := calldataload(_2)
|
||||
let _5 := 0xffffffffffffffff
|
||||
if gt(offset, _5) { revert(_3, _3) }
|
||||
if iszero(slt(add(offset, 35), calldatasize())) { revert(_3, _3) }
|
||||
let _6 := calldataload(add(_2, offset))
|
||||
let _7 := 36
|
||||
if gt(_6, _5)
|
||||
let _4 := 0xffffffffffffffff
|
||||
if gt(offset, _4) { revert(0, 0) }
|
||||
if iszero(slt(add(offset, 35), calldatasize())) { revert(0, 0) }
|
||||
let _5 := calldataload(add(_2, offset))
|
||||
let _6 := 36
|
||||
if gt(_5, _4)
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x41)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
let _8 := shl(5, _6)
|
||||
let _9 := not(31)
|
||||
let newFreePtr := add(_1, and(add(_8, 63), _9))
|
||||
if or(gt(newFreePtr, _5), lt(newFreePtr, _1))
|
||||
let _7 := shl(5, _5)
|
||||
let _8 := not(31)
|
||||
let newFreePtr := add(_1, and(add(_7, 63), _8))
|
||||
if or(gt(newFreePtr, _4), lt(newFreePtr, _1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x41)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
let _10 := 64
|
||||
mstore(_10, newFreePtr)
|
||||
let _9 := 64
|
||||
mstore(_9, newFreePtr)
|
||||
let dst := _1
|
||||
mstore(_1, _6)
|
||||
dst := add(_1, _4)
|
||||
mstore(_1, _5)
|
||||
dst := add(_1, _3)
|
||||
let dst_1 := dst
|
||||
let srcEnd := add(add(offset, _8), _7)
|
||||
if gt(srcEnd, calldatasize()) { revert(_3, _3) }
|
||||
let src := add(offset, _7)
|
||||
for { } lt(src, srcEnd) { src := add(src, _4) }
|
||||
let srcEnd := add(add(offset, _7), _6)
|
||||
if gt(srcEnd, calldatasize()) { revert(0, 0) }
|
||||
let src := add(offset, _6)
|
||||
for { } lt(src, srcEnd) { src := add(src, _3) }
|
||||
{
|
||||
if slt(sub(calldatasize(), src), _4) { revert(_3, _3) }
|
||||
let memPtr := mload(_10)
|
||||
let newFreePtr_1 := add(memPtr, _4)
|
||||
if or(gt(newFreePtr_1, _5), lt(newFreePtr_1, memPtr))
|
||||
if slt(sub(calldatasize(), src), _3) { revert(0, 0) }
|
||||
let memPtr := mload(_9)
|
||||
let newFreePtr_1 := add(memPtr, _3)
|
||||
if or(gt(newFreePtr_1, _4), lt(newFreePtr_1, memPtr))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x41)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
mstore(_10, newFreePtr_1)
|
||||
mstore(_9, newFreePtr_1)
|
||||
mstore(memPtr, calldataload(src))
|
||||
mstore(dst, memPtr)
|
||||
dst := add(dst, _4)
|
||||
dst := add(dst, _3)
|
||||
}
|
||||
if iszero(mload(_1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x32)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
sstore(_3, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1)))
|
||||
sstore(0, mload(/** @src 0:469:474 "_s[0]" */ mload(dst_1)))
|
||||
/// @src 0:346:625 "contract C {..."
|
||||
if iszero(lt(/** @src 0:492:493 "1" */ 0x01, /** @src 0:346:625 "contract C {..." */ mload(_1)))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x32)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
let _11 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _10)))
|
||||
sstore(0x02, _11)
|
||||
let memPtr_1 := mload(_10)
|
||||
let _10 := mload(/** @src 0:489:494 "_s[1]" */ mload(/** @src 0:346:625 "contract C {..." */ add(_1, _9)))
|
||||
sstore(0x02, _10)
|
||||
let memPtr_1 := mload(_9)
|
||||
let newFreePtr_2 := add(memPtr_1, 160)
|
||||
if or(gt(newFreePtr_2, _5), lt(newFreePtr_2, memPtr_1))
|
||||
if or(gt(newFreePtr_2, _4), lt(newFreePtr_2, memPtr_1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_2, 0x41)
|
||||
revert(_3, _7)
|
||||
revert(0, _6)
|
||||
}
|
||||
mstore(_10, newFreePtr_2)
|
||||
mstore(_9, newFreePtr_2)
|
||||
mstore(memPtr_1, 100)
|
||||
mstore(add(memPtr_1, _4), "longstringlongstringlongstringlo")
|
||||
mstore(add(memPtr_1, _10), "ngstringlongstringlongstringlong")
|
||||
let _12 := 96
|
||||
mstore(add(memPtr_1, _12), "stringlongstringlongstringlongst")
|
||||
mstore(add(memPtr_1, _3), "longstringlongstringlongstringlo")
|
||||
mstore(add(memPtr_1, _9), "ngstringlongstringlongstringlong")
|
||||
let _11 := 96
|
||||
mstore(add(memPtr_1, _11), "stringlongstringlongstringlongst")
|
||||
mstore(add(memPtr_1, 128), "ring")
|
||||
let memPos := mload(_10)
|
||||
mstore(memPos, _11)
|
||||
mstore(add(memPos, _4), _10)
|
||||
let memPos := mload(_9)
|
||||
mstore(memPos, _10)
|
||||
mstore(add(memPos, _3), _9)
|
||||
let length := mload(memPtr_1)
|
||||
mstore(add(memPos, _10), length)
|
||||
let i := _3
|
||||
for { } lt(i, length) { i := add(i, _4) }
|
||||
mstore(add(memPos, _9), length)
|
||||
let i := 0
|
||||
for { } lt(i, length) { i := add(i, _3) }
|
||||
{
|
||||
mstore(add(add(memPos, i), _12), mload(add(add(memPtr_1, i), _4)))
|
||||
mstore(add(add(memPos, i), _11), mload(add(add(memPtr_1, i), _3)))
|
||||
}
|
||||
mstore(add(add(memPos, length), _12), _3)
|
||||
return(memPos, add(sub(add(memPos, and(add(length, 31), _9)), memPos), _12))
|
||||
mstore(add(add(memPos, length), _11), 0)
|
||||
return(memPos, add(sub(add(memPos, and(add(length, 31), _8)), memPos), _11))
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -21,26 +21,25 @@ object "Arraysum_34" {
|
||||
let _1 := 4
|
||||
if iszero(lt(calldatasize(), _1))
|
||||
{
|
||||
let _2 := 0
|
||||
if eq(0x81d73423, shr(224, calldataload(_2)))
|
||||
if eq(0x81d73423, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_2, _2) }
|
||||
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
||||
let var_sum := _2
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let var_sum := 0
|
||||
/// @src 0:368:378 "uint i = 0"
|
||||
let var_i := /** @src 0:80:429 "contract Arraysum {..." */ _2
|
||||
let _3 := sload(_2)
|
||||
let var_i := /** @src 0:80:429 "contract Arraysum {..." */ var_sum
|
||||
let _2 := sload(var_sum)
|
||||
/// @src 0:364:423 "for(uint i = 0; i < values.length; i++)..."
|
||||
for { }
|
||||
/** @src 0:380:397 "i < values.length" */ lt(var_i, _3)
|
||||
/** @src 0:380:397 "i < values.length" */ lt(var_i, _2)
|
||||
/// @src 0:368:378 "uint i = 0"
|
||||
{
|
||||
/// @src 0:80:429 "contract Arraysum {..."
|
||||
if eq(var_i, not(0))
|
||||
{
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_1, 0x11)
|
||||
revert(_2, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
/// @src 0:399:402 "i++"
|
||||
var_i := /** @src 0:80:429 "contract Arraysum {..." */ add(var_i, 1)
|
||||
@ -48,13 +47,13 @@ object "Arraysum_34" {
|
||||
/// @src 0:399:402 "i++"
|
||||
{
|
||||
/// @src 0:80:429 "contract Arraysum {..."
|
||||
mstore(_2, _2)
|
||||
mstore(0, 0)
|
||||
let sum := add(var_sum, sload(add(18569430475105882587588266137607568536673111973893317399460219858819262702947, var_i)))
|
||||
if gt(var_sum, sum)
|
||||
{
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(_1, 0x11)
|
||||
revert(_2, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
/// @src 0:407:423 "sum += values[i]"
|
||||
var_sum := sum
|
||||
|
@ -82,20 +82,16 @@ sub_0: assembly {
|
||||
/* \"C\":79:428 contract C... */
|
||||
0x80
|
||||
0x40
|
||||
dup2
|
||||
dup2
|
||||
swap1
|
||||
dup1
|
||||
dup3
|
||||
mstore
|
||||
jumpi(tag_2, iszero(lt(calldatasize, 0x04)))
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_2:
|
||||
0x00
|
||||
swap2
|
||||
dup3
|
||||
calldataload
|
||||
0xe0
|
||||
shr
|
||||
shr(0xe0, calldataload(0x00))
|
||||
swap1
|
||||
dup2
|
||||
0x26121ff0
|
||||
@ -117,13 +113,8 @@ sub_0: assembly {
|
||||
revert
|
||||
tag_8:
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
dup2
|
||||
sload
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
sload(0x00)
|
||||
sub(shl(0xff, 0x01), 0x01)
|
||||
dup2
|
||||
eq
|
||||
@ -131,11 +122,11 @@ sub_0: assembly {
|
||||
jumpi
|
||||
0x01
|
||||
add
|
||||
swap2
|
||||
dup3
|
||||
swap1
|
||||
dup2
|
||||
0x00
|
||||
sstore
|
||||
dup2
|
||||
dup1
|
||||
mload
|
||||
shl(0xe4, 0x026121ff)
|
||||
/* \"C\":403:411 this.f() */
|
||||
@ -152,37 +143,40 @@ sub_0: assembly {
|
||||
/* \"C\":403:411 this.f() */
|
||||
gas
|
||||
staticcall
|
||||
swap2
|
||||
dup3
|
||||
swap1
|
||||
dup2
|
||||
iszero
|
||||
tag_16
|
||||
jumpi
|
||||
dup1
|
||||
swap3
|
||||
/* \"C\":79:428 contract C... */
|
||||
0x00
|
||||
/* \"C\":403:411 this.f() */
|
||||
swap2
|
||||
tag_18
|
||||
jumpi
|
||||
/* \"C\":79:428 contract C... */
|
||||
tag_19:
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
pop
|
||||
tag_20
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_21
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap2
|
||||
/* \"C\":403:411 this.f() */
|
||||
0x20
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
dup5
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_20
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_21
|
||||
dup7
|
||||
dup10
|
||||
swap5
|
||||
tag_1
|
||||
jump\t// in
|
||||
tag_21:
|
||||
tag_20:
|
||||
/* \"C\":414:422 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
swap1
|
||||
tag_1
|
||||
jump\t// in
|
||||
tag_20:
|
||||
tag_21:
|
||||
/* \"C\":79:428 contract C... */
|
||||
swap1
|
||||
mload
|
||||
@ -193,8 +187,6 @@ sub_0: assembly {
|
||||
/* \"C\":403:411 this.f() */
|
||||
tag_18:
|
||||
swap1
|
||||
swap2
|
||||
pop
|
||||
0x20
|
||||
returndatasize
|
||||
dup2
|
||||
@ -238,9 +230,8 @@ sub_0: assembly {
|
||||
pop
|
||||
mload
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_21
|
||||
tag_20
|
||||
/* \"C\":403:411 this.f() */
|
||||
0x20
|
||||
jump(tag_19)
|
||||
/* \"C\":79:428 contract C... */
|
||||
tag_26:
|
||||
@ -263,20 +254,21 @@ sub_0: assembly {
|
||||
jump(tag_23)
|
||||
tag_16:
|
||||
/* \"C\":79:428 contract C... */
|
||||
dup4
|
||||
dup3
|
||||
mload
|
||||
swap1
|
||||
returndatasize
|
||||
swap1
|
||||
0x00
|
||||
dup3
|
||||
returndatacopy
|
||||
returndatasize
|
||||
swap1
|
||||
revert
|
||||
tag_14:
|
||||
shl(0xe0, 0x4e487b71)
|
||||
/* \"C\":117:119 41 */
|
||||
dup4
|
||||
shl(0xe0, 0x4e487b71)
|
||||
/* \"C\":79:428 contract C... */
|
||||
0x00
|
||||
/* \"C\":117:119 41 */
|
||||
mstore
|
||||
0x11
|
||||
/* \"C\":79:428 contract C... */
|
||||
@ -284,24 +276,22 @@ sub_0: assembly {
|
||||
/* \"C\":117:119 41 */
|
||||
mstore
|
||||
0x24
|
||||
dup4
|
||||
/* \"C\":79:428 contract C... */
|
||||
0x00
|
||||
/* \"C\":117:119 41 */
|
||||
revert
|
||||
/* \"C\":79:428 contract C... */
|
||||
tag_12:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_6:
|
||||
pop
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
0x20
|
||||
swap2
|
||||
sload
|
||||
swap1
|
||||
sload(0x00)
|
||||
swap1
|
||||
mload
|
||||
swap1
|
||||
@ -309,22 +299,17 @@ sub_0: assembly {
|
||||
mstore
|
||||
return
|
||||
tag_4:
|
||||
dup4
|
||||
swap1
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
/* \"C\":290:298 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":117:119 41 */
|
||||
dup1
|
||||
0x29
|
||||
add
|
||||
swap1
|
||||
dup2
|
||||
0x29
|
||||
add
|
||||
swap2
|
||||
dup3
|
||||
slt
|
||||
0x01
|
||||
and
|
||||
@ -332,8 +317,7 @@ sub_0: assembly {
|
||||
jumpi
|
||||
/* \"C\":79:428 contract C... */
|
||||
0x20
|
||||
swap3
|
||||
pop
|
||||
swap2
|
||||
dup2
|
||||
mstore
|
||||
return
|
||||
@ -360,13 +344,9 @@ sub_0: assembly {
|
||||
iszero
|
||||
and
|
||||
or
|
||||
tag_38
|
||||
tag_14
|
||||
jumpi
|
||||
jump\t// out
|
||||
tag_38:
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x11)
|
||||
revert(0x00, 0x24)
|
||||
|
||||
auxdata: <AUXDATA REMOVED>
|
||||
}
|
||||
@ -471,20 +451,16 @@ sub_0: assembly {
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
0x80
|
||||
0x40
|
||||
dup2
|
||||
dup2
|
||||
swap1
|
||||
dup1
|
||||
dup3
|
||||
mstore
|
||||
jumpi(tag_2, iszero(lt(calldatasize, 0x04)))
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_2:
|
||||
0x00
|
||||
swap2
|
||||
dup3
|
||||
calldataload
|
||||
0xe0
|
||||
shr
|
||||
shr(0xe0, calldataload(0x00))
|
||||
swap1
|
||||
dup2
|
||||
0x26121ff0
|
||||
@ -506,13 +482,8 @@ sub_0: assembly {
|
||||
revert
|
||||
tag_8:
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
dup2
|
||||
sload
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
sload(0x00)
|
||||
sub(shl(0xff, 0x01), 0x01)
|
||||
dup2
|
||||
eq
|
||||
@ -520,11 +491,11 @@ sub_0: assembly {
|
||||
jumpi
|
||||
0x01
|
||||
add
|
||||
swap2
|
||||
dup3
|
||||
swap1
|
||||
dup2
|
||||
0x00
|
||||
sstore
|
||||
dup2
|
||||
dup1
|
||||
mload
|
||||
shl(0xe4, 0x026121ff)
|
||||
/* \"C\":403:411 this.f() */
|
||||
@ -541,37 +512,40 @@ sub_0: assembly {
|
||||
/* \"C\":403:411 this.f() */
|
||||
gas
|
||||
staticcall
|
||||
swap2
|
||||
dup3
|
||||
swap1
|
||||
dup2
|
||||
iszero
|
||||
tag_16
|
||||
jumpi
|
||||
dup1
|
||||
swap3
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
0x00
|
||||
/* \"C\":403:411 this.f() */
|
||||
swap2
|
||||
tag_18
|
||||
jumpi
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_19:
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
pop
|
||||
tag_20
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_21
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap2
|
||||
/* \"C\":403:411 this.f() */
|
||||
0x20
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
dup5
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_20
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_21
|
||||
dup7
|
||||
dup10
|
||||
swap5
|
||||
tag_1
|
||||
jump\t// in
|
||||
tag_21:
|
||||
tag_20:
|
||||
/* \"C\":414:422 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
swap1
|
||||
tag_1
|
||||
jump\t// in
|
||||
tag_20:
|
||||
tag_21:
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
swap1
|
||||
mload
|
||||
@ -582,8 +556,6 @@ sub_0: assembly {
|
||||
/* \"C\":403:411 this.f() */
|
||||
tag_18:
|
||||
swap1
|
||||
swap2
|
||||
pop
|
||||
0x20
|
||||
returndatasize
|
||||
dup2
|
||||
@ -627,9 +599,8 @@ sub_0: assembly {
|
||||
pop
|
||||
mload
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_21
|
||||
tag_20
|
||||
/* \"C\":403:411 this.f() */
|
||||
0x20
|
||||
jump(tag_19)
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_26:
|
||||
@ -652,20 +623,21 @@ sub_0: assembly {
|
||||
jump(tag_23)
|
||||
tag_16:
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
dup4
|
||||
dup3
|
||||
mload
|
||||
swap1
|
||||
returndatasize
|
||||
swap1
|
||||
0x00
|
||||
dup3
|
||||
returndatacopy
|
||||
returndatasize
|
||||
swap1
|
||||
revert
|
||||
tag_14:
|
||||
shl(0xe0, 0x4e487b71)
|
||||
/* \"C\":117:119 41 */
|
||||
dup4
|
||||
shl(0xe0, 0x4e487b71)
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
0x00
|
||||
/* \"C\":117:119 41 */
|
||||
mstore
|
||||
0x11
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
@ -673,24 +645,22 @@ sub_0: assembly {
|
||||
/* \"C\":117:119 41 */
|
||||
mstore
|
||||
0x24
|
||||
dup4
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
0x00
|
||||
/* \"C\":117:119 41 */
|
||||
revert
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_12:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_6:
|
||||
pop
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
0x20
|
||||
swap2
|
||||
sload
|
||||
swap1
|
||||
sload(0x00)
|
||||
swap1
|
||||
mload
|
||||
swap1
|
||||
@ -698,22 +668,17 @@ sub_0: assembly {
|
||||
mstore
|
||||
return
|
||||
tag_4:
|
||||
dup4
|
||||
swap1
|
||||
jumpi(tag_12, callvalue)
|
||||
dup2
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_12
|
||||
jumpi
|
||||
jumpi(tag_12, slt(add(not(0x03), calldatasize), 0x00))
|
||||
/* \"C\":290:298 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":117:119 41 */
|
||||
dup1
|
||||
0x29
|
||||
add
|
||||
swap1
|
||||
dup2
|
||||
0x29
|
||||
add
|
||||
swap2
|
||||
dup3
|
||||
slt
|
||||
0x01
|
||||
and
|
||||
@ -721,8 +686,7 @@ sub_0: assembly {
|
||||
jumpi
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
0x20
|
||||
swap3
|
||||
pop
|
||||
swap2
|
||||
dup2
|
||||
mstore
|
||||
return
|
||||
@ -749,13 +713,9 @@ sub_0: assembly {
|
||||
iszero
|
||||
and
|
||||
or
|
||||
tag_38
|
||||
tag_14
|
||||
jumpi
|
||||
jump\t// out
|
||||
tag_38:
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x11)
|
||||
revert(0x00, 0x24)
|
||||
|
||||
auxdata: <AUXDATA REMOVED>
|
||||
}
|
||||
|
@ -194,12 +194,11 @@ object \"C_6\" {
|
||||
/// @src 0:60:101 \"contract C {...\"
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -193,12 +193,11 @@ object \"C_6\" {
|
||||
/// @src 0:60:101
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -182,12 +182,11 @@ object \"C_6\" {
|
||||
{
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
return(_1, _1)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -658,78 +658,77 @@ object \"C_54\" {
|
||||
mstore(_2, _1)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _3 := 0
|
||||
switch shr(224, calldataload(_3))
|
||||
switch shr(224, calldataload(0))
|
||||
case 0x26121ff0 {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
/// @src 0:297:305 \"immutVar\"
|
||||
let _4 := loadimmutable(\"8\")
|
||||
let _3 := loadimmutable(\"8\")
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _4)
|
||||
if and(1, slt(sum, _4))
|
||||
let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _3)
|
||||
if and(1, slt(sum, _3))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
mstore(_1, sum)
|
||||
return(_1, 32)
|
||||
}
|
||||
case 0x793816ec {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
let _5 := sload(_3)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _4 := sload(0)
|
||||
let memPos := mload(_2)
|
||||
mstore(memPos, _5)
|
||||
mstore(memPos, _4)
|
||||
return(memPos, 32)
|
||||
}
|
||||
case 0x9942ec6f {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
let _6 := sload(_3)
|
||||
if eq(_6, sub(shl(255, 1), 1))
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _5 := sload(0)
|
||||
if eq(_5, sub(shl(255, 1), 1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
let ret := add(_6, 1)
|
||||
sstore(_3, ret)
|
||||
let ret := add(_5, 1)
|
||||
sstore(0, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _7 := /** @src 0:79:435 \"contract C...\" */ mload(_2)
|
||||
let _6 := /** @src 0:79:435 \"contract C...\" */ mload(_2)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_7, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff))
|
||||
mstore(_6, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32)
|
||||
if iszero(_8)
|
||||
let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32)
|
||||
if iszero(_7)
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let pos := mload(_2)
|
||||
returndatacopy(pos, _3, returndatasize())
|
||||
returndatacopy(pos, 0, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 0:79:435 \"contract C...\" */ _3
|
||||
let expr := /** @src 0:79:435 \"contract C...\" */ 0
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _8
|
||||
if _7
|
||||
{
|
||||
let _9 := 32
|
||||
if gt(_9, returndatasize()) { _9 := returndatasize() }
|
||||
let _8 := 32
|
||||
if gt(_8, returndatasize()) { _8 := returndatasize() }
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let newFreePtr := add(_7, and(add(_9, 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7))
|
||||
let newFreePtr := add(_6, and(add(_8, 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(expr, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_3, 0x24)
|
||||
revert(expr, 0x24)
|
||||
}
|
||||
mstore(_2, newFreePtr)
|
||||
if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 0:79:435 \"contract C...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 0:79:435 \"contract C...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
{ revert(_3, _3) }
|
||||
{ revert(expr, expr) }
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := /** @src 0:79:435 \"contract C...\" */ mload(_7)
|
||||
expr := /** @src 0:79:435 \"contract C...\" */ mload(_6)
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
@ -741,8 +740,8 @@ object \"C_54\" {
|
||||
return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
}
|
||||
case /** @src 0:79:435 \"contract C...\" */ 0xa00b982b {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let memPos_2 := mload(_2)
|
||||
mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
@ -1504,78 +1503,77 @@ object \"D_72\" {
|
||||
mstore(_2, _1)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _3 := 0
|
||||
switch shr(224, calldataload(_3))
|
||||
switch shr(224, calldataload(0))
|
||||
case 0x26121ff0 {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
/// @src 0:297:305 \"immutVar\"
|
||||
let _4 := loadimmutable(\"8\")
|
||||
let _3 := loadimmutable(\"8\")
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _4)
|
||||
if and(1, slt(sum, _4))
|
||||
let sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _3)
|
||||
if and(1, slt(sum, _3))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
mstore(_1, sum)
|
||||
return(_1, 32)
|
||||
}
|
||||
case 0x793816ec {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
let _5 := sload(_3)
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _4 := sload(0)
|
||||
let memPos := mload(_2)
|
||||
mstore(memPos, _5)
|
||||
mstore(memPos, _4)
|
||||
return(memPos, 32)
|
||||
}
|
||||
case 0x9942ec6f {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
let _6 := sload(_3)
|
||||
if eq(_6, sub(shl(255, 1), 1))
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _5 := sload(0)
|
||||
if eq(_5, sub(shl(255, 1), 1))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(_3, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
let ret := add(_6, 1)
|
||||
sstore(_3, ret)
|
||||
let ret := add(_5, 1)
|
||||
sstore(0, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _7 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2)
|
||||
let _6 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_2)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_7, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff))
|
||||
mstore(_6, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _8 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _7, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _7, 32)
|
||||
if iszero(_8)
|
||||
let _7 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _6, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _6, 32)
|
||||
if iszero(_7)
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let pos := mload(_2)
|
||||
returndatacopy(pos, _3, returndatasize())
|
||||
returndatacopy(pos, 0, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _3
|
||||
let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ 0
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _8
|
||||
if _7
|
||||
{
|
||||
let _9 := 32
|
||||
if gt(_9, returndatasize()) { _9 := returndatasize() }
|
||||
let _8 := 32
|
||||
if gt(_8, returndatasize()) { _8 := returndatasize() }
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let newFreePtr := add(_7, and(add(_9, 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _7))
|
||||
let newFreePtr := add(_6, and(add(_8, 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _6))
|
||||
{
|
||||
mstore(_3, shl(224, 0x4e487b71))
|
||||
mstore(expr, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_3, 0x24)
|
||||
revert(expr, 0x24)
|
||||
}
|
||||
mstore(_2, newFreePtr)
|
||||
if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_7, _9), /** @src 1:91:166 \"contract D is C(3)...\" */ _7), /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
if slt(sub(/** @src 0:410:418 \"this.f()\" */ add(_6, _8), /** @src 1:91:166 \"contract D is C(3)...\" */ _6), /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
{ revert(_3, _3) }
|
||||
{ revert(expr, expr) }
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_7)
|
||||
expr := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(_6)
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
@ -1587,8 +1585,8 @@ object \"D_72\" {
|
||||
return(memPos_1, /** @src 0:410:418 \"this.f()\" */ 32)
|
||||
}
|
||||
case /** @src 1:91:166 \"contract D is C(3)...\" */ 0xa00b982b {
|
||||
if callvalue() { revert(_3, _3) }
|
||||
if slt(add(calldatasize(), not(3)), _3) { revert(_3, _3) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let memPos_2 := mload(_2)
|
||||
mstore(memPos_2, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
|
@ -110,103 +110,87 @@ sub_0: assembly {
|
||||
dup1
|
||||
revert
|
||||
tag_1:
|
||||
0x00
|
||||
dup1
|
||||
calldataload
|
||||
0xe0
|
||||
shr
|
||||
0x26121ff0
|
||||
eq
|
||||
tag_3
|
||||
jumpi
|
||||
jumpi(tag_3, eq(0x26121ff0, shr(0xe0, calldataload(0x00))))
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_3:
|
||||
jumpi(tag_7, callvalue)
|
||||
dup1
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_7
|
||||
jumpi
|
||||
jumpi(tag_7, slt(add(not(0x03), calldatasize), 0x00))
|
||||
/* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */
|
||||
dataSize(sub_0)
|
||||
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
|
||||
swap2
|
||||
not(0x1f)
|
||||
swap1
|
||||
dup2
|
||||
not(0x1f)
|
||||
dup1
|
||||
0x3f
|
||||
dup6
|
||||
dup5
|
||||
add
|
||||
and
|
||||
dup2
|
||||
dup3
|
||||
add
|
||||
swap3
|
||||
dup2
|
||||
dup5
|
||||
swap2
|
||||
dup1
|
||||
dup4
|
||||
lt
|
||||
0xffffffffffffffff
|
||||
dup6
|
||||
dup5
|
||||
gt
|
||||
or
|
||||
tag_9
|
||||
jumpi
|
||||
swap3
|
||||
swap1
|
||||
swap2
|
||||
0x40
|
||||
swap4
|
||||
dup5
|
||||
mstore
|
||||
/* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */
|
||||
dup5
|
||||
swap3
|
||||
dup4
|
||||
mstore
|
||||
/* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */
|
||||
dup2
|
||||
dup5
|
||||
mstore
|
||||
0x20
|
||||
swap5
|
||||
swap2
|
||||
dataOffset(sub_0)
|
||||
dup4
|
||||
dup7
|
||||
dup6
|
||||
add
|
||||
codecopy
|
||||
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
|
||||
dup4
|
||||
dup3
|
||||
mload
|
||||
swap5
|
||||
swap4
|
||||
dup3
|
||||
dup6
|
||||
swap3
|
||||
dup2
|
||||
swap4
|
||||
dup5
|
||||
mstore
|
||||
dup5
|
||||
dup2
|
||||
mload
|
||||
swap2
|
||||
dup3
|
||||
dup2
|
||||
dup3
|
||||
dup7
|
||||
add
|
||||
mstore
|
||||
dup2
|
||||
swap6
|
||||
0x00
|
||||
tag_11:
|
||||
dup4
|
||||
dup8
|
||||
dup2
|
||||
lt
|
||||
tag_12
|
||||
jumpi
|
||||
pop
|
||||
pop
|
||||
0x00
|
||||
dup5
|
||||
dup4
|
||||
swap5
|
||||
pop
|
||||
dup6
|
||||
dup3
|
||||
0x1f
|
||||
swap5
|
||||
swap6
|
||||
add
|
||||
dup7
|
||||
add
|
||||
mstore
|
||||
pop
|
||||
0x1f
|
||||
add
|
||||
and
|
||||
dup2
|
||||
@ -216,35 +200,30 @@ sub_0: assembly {
|
||||
swap1
|
||||
return
|
||||
tag_12:
|
||||
dup7
|
||||
dup2
|
||||
dup2
|
||||
add
|
||||
dup3
|
||||
dup4
|
||||
add
|
||||
mload
|
||||
dup10
|
||||
dup9
|
||||
dup3
|
||||
add
|
||||
dup10
|
||||
dup9
|
||||
add
|
||||
mstore
|
||||
swap6
|
||||
dup2
|
||||
add
|
||||
swap6
|
||||
dup9
|
||||
dup8
|
||||
swap6
|
||||
pop
|
||||
dup3
|
||||
add
|
||||
jump(tag_11)
|
||||
tag_9:
|
||||
shl(0xe0, 0x4e487b71)
|
||||
dup2
|
||||
mstore
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x41)
|
||||
0x24
|
||||
swap1
|
||||
revert
|
||||
revert(0x00, 0x24)
|
||||
tag_7:
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
stop
|
||||
|
@ -59,31 +59,30 @@ object "D_16" {
|
||||
mstore(64, _1)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _2 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_2)))
|
||||
if eq(0x26121ff0, shr(224, calldataload(0)))
|
||||
{
|
||||
if callvalue() { revert(_2, _2) }
|
||||
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
/// @src 0:149:156 "new C()"
|
||||
let _3 := datasize("C_3")
|
||||
let _4 := add(_1, _3)
|
||||
if or(gt(_4, 0xffffffffffffffff), lt(_4, _1))
|
||||
let _2 := datasize("C_3")
|
||||
let _3 := add(_1, _2)
|
||||
if or(gt(_3, 0xffffffffffffffff), lt(_3, _1))
|
||||
{
|
||||
/// @src 0:96:165 "contract D {..."
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_2, 0x24)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
/// @src 0:149:156 "new C()"
|
||||
datacopy(_1, dataoffset("C_3"), _3)
|
||||
if iszero(create(/** @src 0:96:165 "contract D {..." */ _2, /** @src 0:149:156 "new C()" */ _1, sub(_4, _1)))
|
||||
datacopy(_1, dataoffset("C_3"), _2)
|
||||
if iszero(create(/** @src 0:96:165 "contract D {..." */ 0, /** @src 0:149:156 "new C()" */ _1, sub(_3, _1)))
|
||||
{
|
||||
/// @src 0:96:165 "contract D {..."
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _2, returndatasize())
|
||||
returndatacopy(pos, 0, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
return(_2, _2)
|
||||
return(0, 0)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
|
@ -17,9 +17,9 @@ contract C {
|
||||
// optimize-yul: true
|
||||
// ----
|
||||
// creation:
|
||||
// codeDepositCost: 640600
|
||||
// executionCost: 674
|
||||
// totalCost: 641274
|
||||
// codeDepositCost: 638600
|
||||
// executionCost: 668
|
||||
// totalCost: 639268
|
||||
// external:
|
||||
// a(): 2283
|
||||
// b(uint256): 4649
|
||||
|
@ -21,6 +21,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
|
||||
// gas irOptimized: 203166
|
||||
// gas irOptimized: 203149
|
||||
// gas legacy: 206263
|
||||
// gas legacyOptimized: 203151
|
||||
// gas legacyOptimized: 203156
|
||||
|
@ -59,10 +59,10 @@ contract C {
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 361321
|
||||
// gas irOptimized: 360827
|
||||
// gas legacy: 411269
|
||||
// gas legacyOptimized: 317754
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 509988
|
||||
// gas irOptimized: 509533
|
||||
// gas legacy: 577469
|
||||
// gas legacyOptimized: 440931
|
||||
|
@ -24,6 +24,6 @@ contract C {
|
||||
// ----
|
||||
// library: L
|
||||
// f() -> 8, 7, 1, 2, 7, 12
|
||||
// gas irOptimized: 166506
|
||||
// gas irOptimized: 166467
|
||||
// gas legacy: 169283
|
||||
// gas legacyOptimized: 167248
|
||||
|
@ -60,10 +60,10 @@ contract C {
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 361321
|
||||
// gas irOptimized: 360827
|
||||
// gas legacy: 411269
|
||||
// gas legacyOptimized: 317754
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 509988
|
||||
// gas irOptimized: 509533
|
||||
// gas legacy: 577469
|
||||
// gas legacyOptimized: 440931
|
||||
|
@ -50,6 +50,6 @@ contract C {
|
||||
// f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
|
||||
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
|
||||
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
|
||||
// gas irOptimized: 112641
|
||||
// gas irOptimized: 112630
|
||||
// gas legacy: 114794
|
||||
// gas legacyOptimized: 112572
|
||||
|
@ -30,6 +30,6 @@ contract C is B {
|
||||
}
|
||||
// ----
|
||||
// test() -> 77
|
||||
// gas irOptimized: 119177
|
||||
// gas irOptimized: 110731
|
||||
// gas legacy: 151866
|
||||
// gas legacyOptimized: 110359
|
||||
|
@ -20,6 +20,6 @@ contract C {
|
||||
// f(uint256[][1]): 32, 32, 0 -> true
|
||||
// f(uint256[][1]): 32, 32, 1, 42 -> true
|
||||
// f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true
|
||||
// gas irOptimized: 127012
|
||||
// gas irOptimized: 126849
|
||||
// gas legacy: 139800
|
||||
// gas legacyOptimized: 119092
|
||||
|
@ -33,7 +33,7 @@ contract C {
|
||||
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2
|
||||
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE
|
||||
// f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2
|
||||
// gas irOptimized: 111650
|
||||
// gas irOptimized: 111639
|
||||
// gas legacy: 112944
|
||||
// gas legacyOptimized: 112092
|
||||
// f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6
|
||||
|
@ -18,10 +18,10 @@ contract C {
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
|
||||
// gas irOptimized: 180823
|
||||
// gas irOptimized: 180808
|
||||
// gas legacy: 184830
|
||||
// gas legacyOptimized: 181493
|
||||
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
|
||||
// gas irOptimized: 112459
|
||||
// gas irOptimized: 112425
|
||||
// gas legacy: 115398
|
||||
// gas legacyOptimized: 112982
|
||||
|
@ -8,6 +8,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
|
||||
// gas irOptimized: 135693
|
||||
// gas irOptimized: 135662
|
||||
// gas legacy: 137278
|
||||
// gas legacyOptimized: 136043
|
||||
// gas legacyOptimized: 136048
|
||||
|
@ -26,7 +26,7 @@ contract C {
|
||||
// index(uint256): 10 -> true
|
||||
// index(uint256): 20 -> true
|
||||
// index(uint256): 0xFF -> true
|
||||
// gas irOptimized: 135073
|
||||
// gas irOptimized: 135060
|
||||
// gas legacy: 241703
|
||||
// gas legacyOptimized: 151613
|
||||
// accessIndex(uint256,int256): 10, 1 -> 2
|
||||
|
@ -16,38 +16,38 @@ contract C {
|
||||
// ----
|
||||
// test_indices(uint256): 1 ->
|
||||
// test_indices(uint256): 129 ->
|
||||
// gas irOptimized: 3019936
|
||||
// gas irOptimized: 3016570
|
||||
// gas legacy: 3069098
|
||||
// gas legacyOptimized: 3013250
|
||||
// test_indices(uint256): 5 ->
|
||||
// gas irOptimized: 577789
|
||||
// gas irOptimized: 576716
|
||||
// gas legacy: 574754
|
||||
// gas legacyOptimized: 572383
|
||||
// test_indices(uint256): 10 ->
|
||||
// gas irOptimized: 158291
|
||||
// gas irOptimized: 158059
|
||||
// gas legacy: 162468
|
||||
// gas legacyOptimized: 158336
|
||||
// test_indices(uint256): 15 ->
|
||||
// gas irOptimized: 173296
|
||||
// gas irOptimized: 172984
|
||||
// gas legacy: 179513
|
||||
// gas legacyOptimized: 173606
|
||||
// test_indices(uint256): 0xFF ->
|
||||
// gas irOptimized: 5678606
|
||||
// gas irOptimized: 5672104
|
||||
// gas legacy: 5775928
|
||||
// gas legacyOptimized: 5666726
|
||||
// test_indices(uint256): 1000 ->
|
||||
// gas irOptimized: 18197173
|
||||
// gas irOptimized: 18173701
|
||||
// gas legacy: 18583810
|
||||
// gas legacyOptimized: 18171248
|
||||
// test_indices(uint256): 129 ->
|
||||
// gas irOptimized: 4156312
|
||||
// gas irOptimized: 4147676
|
||||
// gas legacy: 4164468
|
||||
// gas legacyOptimized: 4122100
|
||||
// test_indices(uint256): 128 ->
|
||||
// gas irOptimized: 411289
|
||||
// gas irOptimized: 409209
|
||||
// gas legacy: 463706
|
||||
// gas legacyOptimized: 418061
|
||||
// test_indices(uint256): 1 ->
|
||||
// gas irOptimized: 581362
|
||||
// gas irOptimized: 580316
|
||||
// gas legacy: 576904
|
||||
// gas legacyOptimized: 575649
|
||||
|
@ -16,11 +16,11 @@ contract C {
|
||||
// test_boundary_check(uint256,uint256): 1, 1 -> FAILURE, hex"4e487b71", 0x32
|
||||
// test_boundary_check(uint256,uint256): 10, 10 -> FAILURE, hex"4e487b71", 0x32
|
||||
// test_boundary_check(uint256,uint256): 256, 256 -> FAILURE, hex"4e487b71", 0x32
|
||||
// gas irOptimized: 140383
|
||||
// gas irOptimized: 137904
|
||||
// gas legacy: 133633
|
||||
// gas legacyOptimized: 114354
|
||||
// test_boundary_check(uint256,uint256): 256, 255 -> 0
|
||||
// gas irOptimized: 142515
|
||||
// gas irOptimized: 140039
|
||||
// gas legacy: 135949
|
||||
// gas legacyOptimized: 116533
|
||||
// test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32
|
||||
|
@ -52,18 +52,18 @@ contract C {
|
||||
// ----
|
||||
// test_zeroed_indicies(uint256): 1 ->
|
||||
// test_zeroed_indicies(uint256): 5 ->
|
||||
// gas irOptimized: 131925
|
||||
// gas irOptimized: 131804
|
||||
// gas legacy: 132804
|
||||
// gas legacyOptimized: 130649
|
||||
// test_zeroed_indicies(uint256): 10 ->
|
||||
// gas irOptimized: 225874
|
||||
// gas irOptimized: 225692
|
||||
// gas legacy: 227786
|
||||
// gas legacyOptimized: 223830
|
||||
// test_zeroed_indicies(uint256): 15 ->
|
||||
// gas irOptimized: 323938
|
||||
// gas irOptimized: 323700
|
||||
// gas legacy: 326902
|
||||
// gas legacyOptimized: 321206
|
||||
// test_zeroed_indicies(uint256): 0xFF ->
|
||||
// gas irOptimized: 5116738
|
||||
// gas irOptimized: 5112496
|
||||
// gas legacy: 5165874
|
||||
// gas legacyOptimized: 5062182
|
||||
|
@ -16,7 +16,7 @@ contract C {
|
||||
// gas legacy: 128571
|
||||
// gas legacyOptimized: 110143
|
||||
// set_get_length(uint256): 0xFFF -> 0xFFF
|
||||
// gas irOptimized: 1220647
|
||||
// gas irOptimized: 1209119
|
||||
// gas legacy: 1689548
|
||||
// gas legacyOptimized: 1393535
|
||||
// set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas #
|
||||
|
@ -12,11 +12,11 @@ contract C {
|
||||
// EVMVersion: >=petersburg
|
||||
// ----
|
||||
// pushEmpty(uint256): 128
|
||||
// gas irOptimized: 406413
|
||||
// gas irOptimized: 404095
|
||||
// gas legacy: 415744
|
||||
// gas legacyOptimized: 397380
|
||||
// pushEmpty(uint256): 256
|
||||
// gas irOptimized: 693185
|
||||
// gas irOptimized: 689843
|
||||
// gas legacy: 715316
|
||||
// gas legacyOptimized: 688632
|
||||
// pushEmpty(uint256): 38869 -> FAILURE # out-of-gas #
|
||||
|
@ -21,11 +21,11 @@ contract C {
|
||||
// gas legacy: 77730
|
||||
// gas legacyOptimized: 77162
|
||||
// set_get_length(uint256): 0xFF -> 0xFF
|
||||
// gas irOptimized: 161440
|
||||
// gas irOptimized: 158881
|
||||
// gas legacy: 696850
|
||||
// gas legacyOptimized: 134488
|
||||
// set_get_length(uint256): 0xFFF -> 0xFFF
|
||||
// gas irOptimized: 1800622
|
||||
// gas irOptimized: 1762213
|
||||
// gas legacy: 9857362
|
||||
// gas legacyOptimized: 1393660
|
||||
// set_get_length(uint256): 0xFFFFF -> FAILURE # Out-of-gas #
|
||||
|
@ -17,11 +17,11 @@ contract C {
|
||||
// gas legacy: 105722
|
||||
// gas legacyOptimized: 103508
|
||||
// set_get_length(uint256): 0xFF -> 0
|
||||
// gas irOptimized: 821106
|
||||
// gas irOptimized: 815997
|
||||
// gas legacy: 808020
|
||||
// gas legacyOptimized: 784467
|
||||
// set_get_length(uint256): 0xFFF -> 0
|
||||
// gas irOptimized: 12828798
|
||||
// gas irOptimized: 12746889
|
||||
// gas legacy: 12612192
|
||||
// gas legacyOptimized: 12239199
|
||||
// set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas #
|
||||
|
@ -12,7 +12,7 @@ contract Test {
|
||||
}
|
||||
// ----
|
||||
// set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06
|
||||
// gas irOptimized: 186537
|
||||
// gas irOptimized: 186554
|
||||
// gas legacy: 211054
|
||||
// gas legacyOptimized: 206042
|
||||
// data(uint256,uint256): 0x02, 0x02 -> 0x09
|
||||
|
@ -17,6 +17,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0
|
||||
// gas irOptimized: 125584
|
||||
// gas irOptimized: 125212
|
||||
// gas legacy: 150372
|
||||
// gas legacyOptimized: 146391
|
||||
|
@ -13,7 +13,7 @@ contract c {
|
||||
// ----
|
||||
// getLength() -> 0
|
||||
// set(): 1, 2 -> true
|
||||
// gas irOptimized: 110400
|
||||
// gas irOptimized: 110392
|
||||
// gas legacy: 110952
|
||||
// gas legacyOptimized: 110580
|
||||
// gas legacyOptimized: 110579
|
||||
// getLength() -> 68
|
||||
|
@ -8,7 +8,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// constructor(): 1, 2, 3 ->
|
||||
// gas irOptimized: 140952
|
||||
// gas irOptimized: 139656
|
||||
// gas legacy: 180517
|
||||
// gas legacyOptimized: 150462
|
||||
// a(uint256): 0 -> 1
|
||||
|
@ -20,7 +20,7 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32
|
||||
// gas irOptimized: 648323
|
||||
// gas irOptimized: 648319
|
||||
// gas legacy: 694356
|
||||
// gas legacyOptimized: 693864
|
||||
// retrieve() -> 9, 28, 9, 28, 4, 3, 32
|
||||
|
@ -46,6 +46,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> true
|
||||
// gas irOptimized: 117369
|
||||
// gas irOptimized: 117261
|
||||
// gas legacy: 124660
|
||||
// gas legacyOptimized: 122801
|
||||
|
@ -13,6 +13,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0
|
||||
// gas irOptimized: 107488
|
||||
// gas irOptimized: 107453
|
||||
// gas legacy: 108218
|
||||
// gas legacyOptimized: 107625
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 208122
|
||||
// gas irOptimized: 208044
|
||||
// gas legacy: 221769
|
||||
// gas legacyOptimized: 220611
|
||||
|
@ -35,12 +35,12 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0x02000202
|
||||
// gas irOptimized: 4548245
|
||||
// gas irOptimized: 4548150
|
||||
// gas legacy: 4476222
|
||||
// gas legacyOptimized: 4448113
|
||||
// storageEmpty -> 1
|
||||
// clear() -> 0, 0
|
||||
// gas irOptimized: 4475224
|
||||
// gas irOptimized: 4475134
|
||||
// gas legacy: 4408014
|
||||
// gas legacyOptimized: 4381784
|
||||
// storageEmpty -> 1
|
||||
|
@ -12,6 +12,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
|
||||
// gas irOptimized: 689714
|
||||
// gas irOptimized: 689666
|
||||
// gas legacy: 686178
|
||||
// gas legacyOptimized: 685628
|
||||
|
@ -17,6 +17,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 5, 4
|
||||
// gas irOptimized: 205062
|
||||
// gas irOptimized: 205045
|
||||
// gas legacy: 213863
|
||||
// gas legacyOptimized: 212902
|
||||
|
@ -21,6 +21,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 3, 4
|
||||
// gas irOptimized: 169602
|
||||
// gas irOptimized: 169586
|
||||
// gas legacy: 175424
|
||||
// gas legacyOptimized: 172535
|
||||
|
@ -15,7 +15,7 @@ contract c {
|
||||
// ----
|
||||
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
|
||||
// copyStorageStorage() ->
|
||||
// gas irOptimized: 111366
|
||||
// gas irOptimized: 111348
|
||||
// gas legacy: 109272
|
||||
// gas legacyOptimized: 109262
|
||||
// getData2(uint256): 5 -> 10, 4
|
||||
|
@ -17,6 +17,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 5, 4
|
||||
// gas irOptimized: 252986
|
||||
// gas irOptimized: 252929
|
||||
// gas legacy: 250892
|
||||
// gas legacyOptimized: 250046
|
||||
|
@ -11,6 +11,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 9, 4
|
||||
// gas irOptimized: 123142
|
||||
// gas irOptimized: 123136
|
||||
// gas legacy: 123567
|
||||
// gas legacyOptimized: 123202
|
||||
|
@ -14,6 +14,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 8, 0
|
||||
// gas irOptimized: 196278
|
||||
// gas irOptimized: 196259
|
||||
// gas legacy: 194843
|
||||
// gas legacyOptimized: 194281
|
||||
|
@ -17,7 +17,7 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 4, 5
|
||||
// gas irOptimized: 190870
|
||||
// gas irOptimized: 190694
|
||||
// gas legacy: 190852
|
||||
// gas legacyOptimized: 189658
|
||||
// storageEmpty -> 1
|
||||
|
@ -15,6 +15,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3
|
||||
// gas irOptimized: 161715
|
||||
// gas irOptimized: 161627
|
||||
// gas legacy: 162203
|
||||
// gas legacyOptimized: 159941
|
||||
// gas legacyOptimized: 159934
|
||||
|
@ -17,6 +17,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 104665
|
||||
// gas irOptimized: 104534
|
||||
// gas legacy: 166874
|
||||
// gas legacyOptimized: 145474
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0
|
||||
// gas irOptimized: 273576
|
||||
// gas irOptimized: 273564
|
||||
// gas legacy: 283666
|
||||
// gas legacyOptimized: 282023
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00
|
||||
// gas irOptimized: 233285
|
||||
// gas irOptimized: 233271
|
||||
// gas legacy: 236523
|
||||
// gas legacyOptimized: 235592
|
||||
|
@ -52,9 +52,9 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// gas irOptimized: 150061
|
||||
// gas irOptimized: 150004
|
||||
// gas legacy: 150745
|
||||
// gas legacyOptimized: 148685
|
||||
// gas legacyOptimized: 148678
|
||||
// from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
|
@ -38,10 +38,10 @@ contract c {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 180759
|
||||
// gas irOptimized: 180716
|
||||
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 157562
|
||||
// gas irOptimized: 157544
|
||||
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 134637
|
||||
// gas irOptimized: 134629
|
||||
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
|
||||
// gas irOptimized: 111270
|
||||
// gas irOptimized: 111252
|
||||
|
@ -38,12 +38,12 @@ contract Test {
|
||||
}
|
||||
// ----
|
||||
// test() -> 24
|
||||
// gas irOptimized: 226687
|
||||
// gas irOptimized: 226661
|
||||
// gas legacy: 227084
|
||||
// gas legacyOptimized: 226529
|
||||
// test1() -> 3
|
||||
// test2() -> 6
|
||||
// test3() -> 24
|
||||
// gas irOptimized: 141244
|
||||
// gas irOptimized: 141223
|
||||
// gas legacy: 142238
|
||||
// gas legacyOptimized: 141365
|
||||
|
@ -45,7 +45,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// copyExternalStorageArrayOfFunctionType() -> true
|
||||
// gas irOptimized: 104606
|
||||
// gas irOptimized: 104592
|
||||
// gas legacy: 108554
|
||||
// gas legacyOptimized: 102413
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -48,7 +48,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// copyExternalStorageArraysOfFunctionType() -> true
|
||||
// gas irOptimized: 104279
|
||||
// gas irOptimized: 104265
|
||||
// gas legacy: 108295
|
||||
// gas legacyOptimized: 102146
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -17,4 +17,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
|
||||
// gas irOptimized: 119736
|
||||
// gas irOptimized: 119691
|
||||
|
@ -19,4 +19,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 10, 11, 12
|
||||
// gas irOptimized: 118393
|
||||
// gas irOptimized: 118360
|
||||
|
@ -23,4 +23,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
|
||||
// gas irOptimized: 327759
|
||||
// gas irOptimized: 327383
|
||||
|
@ -26,4 +26,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 3, 3, 3, 1
|
||||
// gas irOptimized: 181950
|
||||
// gas irOptimized: 181912
|
||||
|
@ -12,6 +12,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 1, 2, 3
|
||||
// gas irOptimized: 131932
|
||||
// gas irOptimized: 131915
|
||||
// gas legacy: 134606
|
||||
// gas legacyOptimized: 131938
|
||||
|
@ -37,8 +37,8 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// gas irOptimized: 147892
|
||||
// gas irOptimized: 147868
|
||||
// gas legacy: 148896
|
||||
// gas legacyOptimized: 146908
|
||||
// gas legacyOptimized: 146901
|
||||
// from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
|
@ -5,11 +5,11 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// set(uint256): 1, 2 -> true
|
||||
// gas irOptimized: 110574
|
||||
// gas irOptimized: 110558
|
||||
// gas legacy: 111312
|
||||
// gas legacyOptimized: 110744
|
||||
// set(uint256): 2, 2, 3, 4, 5 -> true
|
||||
// gas irOptimized: 177525
|
||||
// gas irOptimized: 177509
|
||||
// gas legacy: 178314
|
||||
// gas legacyOptimized: 177719
|
||||
// storageEmpty -> 0
|
||||
|
@ -17,25 +17,25 @@ contract c {
|
||||
// ----
|
||||
// f(uint256): 0 -> 0x20, 0x00
|
||||
// f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00
|
||||
// gas irOptimized: 109255
|
||||
// gas irOptimized: 109794
|
||||
// gas legacy: 123948
|
||||
// gas legacyOptimized: 118948
|
||||
// f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671
|
||||
// gas irOptimized: 123936
|
||||
// gas irOptimized: 124047
|
||||
// gas legacy: 140362
|
||||
// gas legacyOptimized: 135386
|
||||
// f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 130543
|
||||
// gas irOptimized: 130663
|
||||
// gas legacy: 147916
|
||||
// gas legacyOptimized: 142290
|
||||
// gas legacyOptimized: 142278
|
||||
// f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992
|
||||
// gas irOptimized: 139333
|
||||
// gas irOptimized: 139543
|
||||
// gas legacy: 171136
|
||||
// gas legacyOptimized: 161550
|
||||
// gas legacyOptimized: 161538
|
||||
// f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000
|
||||
// gas legacy: 59345
|
||||
// gas legacyOptimized: 57279
|
||||
// f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968
|
||||
// gas irOptimized: 441985
|
||||
// gas irOptimized: 442419
|
||||
// gas legacy: 505021
|
||||
// gas legacyOptimized: 486997
|
||||
|
@ -9,6 +9,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1
|
||||
// gas irOptimized: 110970
|
||||
// gas irOptimized: 110962
|
||||
// gas legacy: 111551
|
||||
// gas legacyOptimized: 111339
|
||||
|
@ -14,4 +14,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
|
||||
// gas irOptimized: 139905
|
||||
// gas irOptimized: 139685
|
||||
|
@ -16,7 +16,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 234419
|
||||
// gas irOptimized: 226349
|
||||
// gas legacy: 215757
|
||||
// gas legacyOptimized: 181760
|
||||
// f() -> 0
|
||||
|
@ -35,12 +35,12 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 179752
|
||||
// gas irOptimized: 179737
|
||||
// gas legacy: 181001
|
||||
// gas legacyOptimized: 180014
|
||||
// gas legacyOptimized: 180018
|
||||
// g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000
|
||||
// gas irOptimized: 106682
|
||||
// gas irOptimized: 106666
|
||||
// gas legacy: 109720
|
||||
// gas legacyOptimized: 106937
|
||||
// gas legacyOptimized: 106932
|
||||
// h() -> 0x40, 0x60, 0x00, 0x00
|
||||
// storageEmpty -> 1
|
||||
|
@ -46,6 +46,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0xff
|
||||
// gas irOptimized: 143426
|
||||
// gas irOptimized: 143412
|
||||
// gas legacy: 153395
|
||||
// gas legacyOptimized: 146722
|
||||
// gas legacyOptimized: 146720
|
||||
|
@ -15,6 +15,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// test() -> 7
|
||||
// gas irOptimized: 122477
|
||||
// gas irOptimized: 122454
|
||||
// gas legacy: 205176
|
||||
// gas legacyOptimized: 204971
|
||||
|
@ -7,9 +7,9 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// set(): 1, 2, 3, 4, 5 -> true
|
||||
// gas irOptimized: 177383
|
||||
// gas irOptimized: 177375
|
||||
// gas legacy: 177954
|
||||
// gas legacyOptimized: 177554
|
||||
// gas legacyOptimized: 177553
|
||||
// storageEmpty -> 0
|
||||
// reset() -> true
|
||||
// storageEmpty -> 1
|
||||
|
@ -18,9 +18,9 @@ contract sender {
|
||||
}
|
||||
// ----
|
||||
// (): 7 ->
|
||||
// gas irOptimized: 110820
|
||||
// gas irOptimized: 110831
|
||||
// gas legacy: 111388
|
||||
// gas legacyOptimized: 111071
|
||||
// gas legacyOptimized: 111070
|
||||
// val() -> 0
|
||||
// forward(bool): true -> true
|
||||
// val() -> 0x80
|
||||
|
@ -31,8 +31,8 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29
|
||||
// gas irOptimized: 327821
|
||||
// gas irOptimized: 327844
|
||||
// test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 140867
|
||||
// gas irOptimized: 140870
|
||||
// test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 188473
|
||||
// gas irOptimized: 188515
|
||||
|
@ -31,8 +31,8 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1((uint8[],uint8[2])[][][]): 0x20, 1, 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29
|
||||
// gas irOptimized: 332527
|
||||
// gas irOptimized: 332687
|
||||
// test2((uint8[],uint8[2])[][1][]): 0x20, 2, 0x40, 0x0160, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13, 0x20, 1, 0x20, 0x60, 31, 37, 2, 23, 29 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 145155
|
||||
// gas irOptimized: 145161
|
||||
// test3((uint8[],uint8[2])[1][][2]): 0x20, 0x40, 0x60, 0, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 288, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 192476
|
||||
// gas irOptimized: 192608
|
||||
|
@ -46,7 +46,7 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// test() -> 0x20, 0x14, "[a called][b called]"
|
||||
// gas irOptimized: 116638
|
||||
// gas irOptimized: 116631
|
||||
// gas legacy: 118936
|
||||
// gas legacyOptimized: 116975
|
||||
// test2() -> 0x20, 0x14, "[b called][a called]"
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 3
|
||||
// gas irOptimized: 128116
|
||||
// gas irOptimized: 128273
|
||||
// gas legacy: 130584
|
||||
// gas legacyOptimized: 129031
|
||||
// gas legacyOptimized: 129028
|
||||
|
@ -70,15 +70,15 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// test1() ->
|
||||
// gas irOptimized: 150508
|
||||
// gas irOptimized: 150460
|
||||
// gas legacy: 150949
|
||||
// gas legacyOptimized: 150906
|
||||
// test2() -> FAILURE
|
||||
// gas irOptimized: 150385
|
||||
// gas irOptimized: 150378
|
||||
// gas legacy: 150673
|
||||
// gas legacyOptimized: 150576
|
||||
// test3() ->
|
||||
// gas irOptimized: 123776
|
||||
// gas irOptimized: 123762
|
||||
// gas legacy: 125333
|
||||
// gas legacyOptimized: 125127
|
||||
// test4() -> FAILURE
|
||||
|
@ -29,8 +29,8 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29
|
||||
// gas irOptimized: 304714
|
||||
// gas irOptimized: 304751
|
||||
// test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 116454
|
||||
// gas irOptimized: 116449
|
||||
// test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 187962
|
||||
// gas irOptimized: 188004
|
||||
|
@ -29,8 +29,8 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1((uint8[],uint8[2])[][]): 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29 -> 0x20, 2, 0x40, 0x0140, 1, 0x20, 0x60, 3, 7, 2, 1, 2, 2, 0x40, 0x0100, 0x60, 17, 19, 2, 11, 13, 0x60, 31, 37, 2, 23, 29
|
||||
// gas irOptimized: 309068
|
||||
// gas irOptimized: 309071
|
||||
// test2((uint8[],uint8[2])[][1]): 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 0x20, 1, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 118167
|
||||
// gas irOptimized: 118264
|
||||
// test3((uint8[],uint8[2])[1][]): 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13 -> 0x20, 2, 0x40, 0x0120, 0x20, 0x60, 3, 7, 2, 1, 2, 0x20, 0x60, 17, 19, 2, 11, 13
|
||||
// gas irOptimized: 190961
|
||||
// gas irOptimized: 191003
|
||||
|
@ -63,7 +63,7 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1()
|
||||
// gas irOptimized: 123237
|
||||
// gas irOptimized: 123202
|
||||
// test2()
|
||||
// gas irOptimized: 123043
|
||||
// gas irOptimized: 123030
|
||||
// test3()
|
||||
|
@ -30,7 +30,7 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9
|
||||
// gas irOptimized: 138054
|
||||
// gas irOptimized: 138040
|
||||
// test2(uint8[][]): 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9
|
||||
// gas irOptimized: 164232
|
||||
// gas irOptimized: 164248
|
||||
// gas legacyOptimized: 120228
|
||||
|
@ -17,6 +17,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 1, 2, 3, 4, 5, 6, 7
|
||||
// gas irOptimized: 205974
|
||||
// gas irOptimized: 205881
|
||||
// gas legacy: 212237
|
||||
// gas legacyOptimized: 211425
|
||||
|
@ -11,6 +11,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000
|
||||
// gas irOptimized: 202805
|
||||
// gas irOptimized: 202738
|
||||
// gas legacy: 204798
|
||||
// gas legacyOptimized: 203368
|
||||
// gas legacyOptimized: 203357
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 1, 2, 3, 4, 5, 6, 7
|
||||
// gas irOptimized: 205974
|
||||
// gas irOptimized: 205881
|
||||
// gas legacy: 212242
|
||||
// gas legacyOptimized: 211430
|
||||
|
@ -24,6 +24,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 11, 0x0c, 1, 0x15, 22, 4
|
||||
// gas irOptimized: 291155
|
||||
// gas irOptimized: 291047
|
||||
// gas legacy: 293407
|
||||
// gas legacyOptimized: 290218
|
||||
|
@ -13,6 +13,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> 2, 3, 4
|
||||
// gas irOptimized: 109804
|
||||
// gas irOptimized: 109698
|
||||
// gas legacy: 126129
|
||||
// gas legacyOptimized: 120622
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// f() -> "A", 8, 4, "B"
|
||||
// gas irOptimized: 125827
|
||||
// gas irOptimized: 125819
|
||||
// gas legacy: 121382
|
||||
// gas legacyOptimized: 115488
|
||||
|
@ -16,6 +16,6 @@ contract c {
|
||||
}
|
||||
// ----
|
||||
// test1() -> true
|
||||
// gas irOptimized: 206322
|
||||
// gas irOptimized: 206086
|
||||
// gas legacy: 254056
|
||||
// gas legacyOptimized: 246887
|
||||
// gas legacyOptimized: 246892
|
||||
|
@ -14,7 +14,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 519276
|
||||
// gas irOptimized: 519266
|
||||
// gas legacy: 521414
|
||||
// gas legacyOptimized: 516983
|
||||
// storageEmpty -> 0
|
||||
|
@ -41,7 +41,7 @@ contract c {
|
||||
// ----
|
||||
// getLengths() -> 0, 0
|
||||
// setLengths(uint256,uint256): 48, 49 ->
|
||||
// gas irOptimized: 111301
|
||||
// gas irOptimized: 110797
|
||||
// gas legacy: 108273
|
||||
// gas legacyOptimized: 100269
|
||||
// getLengths() -> 48, 49
|
||||
|
@ -16,7 +16,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() -> 8
|
||||
// gas irOptimized: 122916
|
||||
// gas irOptimized: 122742
|
||||
// gas legacy: 121602
|
||||
// gas legacyOptimized: 120589
|
||||
// storageEmpty -> 0
|
||||
|
@ -10,7 +10,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 465324
|
||||
// gas irOptimized: 465314
|
||||
// gas legacy: 471178
|
||||
// gas legacyOptimized: 467478
|
||||
// storageEmpty -> 0
|
||||
|
@ -18,6 +18,6 @@ contract B {
|
||||
}
|
||||
// ----
|
||||
// f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004
|
||||
// gas irOptimized: 115828
|
||||
// gas irOptimized: 114204
|
||||
// gas legacy: 230001
|
||||
// gas legacyOptimized: 130637
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user