Update commandline tests.

This commit is contained in:
chriseth 2021-04-13 12:08:11 +02:00
parent 00fb2d390b
commit 314f361d07
4 changed files with 64 additions and 80 deletions

View File

@ -45,7 +45,7 @@ object "C_59" {
for { } lt(i, _4) { i := add(i, 1) } for { } lt(i, _4) { i := add(i, 1) }
{ {
if slt(sub(calldatasize(), src), _2) { revert(_1, _1) } if slt(sub(calldatasize(), src), _2) { revert(_1, _1) }
let value := allocate_memory_1245() let value := allocate_memory_1238()
mstore(value, calldataload(src)) mstore(value, calldataload(src))
mstore(dst, value) mstore(dst, value)
dst := add(dst, _2) dst := add(dst, _2)
@ -65,18 +65,18 @@ object "C_59" {
mstore(add(headStart, _1), 64) mstore(add(headStart, _1), 64)
let length := mload(value1) let length := mload(value1)
mstore(add(headStart, 64), length) mstore(add(headStart, 64), length)
let i := tail let i := 0
for { } lt(i, length) { i := add(i, _1) } for { } lt(i, length) { i := add(i, _1) }
{ {
mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1))) mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1)))
} }
if gt(i, length) if gt(i, length)
{ {
mstore(add(add(headStart, length), 96), tail) mstore(add(add(headStart, length), 96), 0)
} }
tail := add(add(headStart, and(add(length, 31), not(31))), 96) tail := add(add(headStart, and(add(length, 31), not(31))), 96)
} }
function allocate_memory_1245() -> memPtr function allocate_memory_1238() -> memPtr
{ {
memPtr := mload(64) memPtr := mload(64)
let newFreePtr := add(memPtr, 32) let newFreePtr := add(memPtr, 32)
@ -90,40 +90,24 @@ object "C_59" {
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() } if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr) mstore(64, newFreePtr)
} }
function copy_literal_to_memory_64902fd228f7ef267f3b474dd6ef84bae434cf5546eee948e7ca26df3eda1927() -> memPtr
{
let memPtr_1 := mload(64)
let newFreePtr := add(memPtr_1, 160)
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr_1)) { panic_error_0x41() }
mstore(64, newFreePtr)
mstore(memPtr_1, 100)
memPtr := memPtr_1
mstore(add(memPtr_1, 0x20), "longstringlongstringlongstringlo")
mstore(add(memPtr_1, 64), "ngstringlongstringlongstringlong")
mstore(add(memPtr_1, 96), "stringlongstringlongstringlongst")
mstore(add(memPtr_1, 128), "ring")
}
function extract_from_storage_value_dynamict_uint256(slot_value, offset) -> value
{
value := shr(shl(3, offset), slot_value)
}
function fun_sumArray(var_s_mpos) -> var, var_mpos function fun_sumArray(var_s_mpos) -> var, var_mpos
{ {
if iszero(lt(var_mpos, mload(var_s_mpos))) { panic_error_0x32() } if iszero(mload(var_s_mpos)) { panic_error_0x32() }
let _1 := mload(mload(add(add(var_s_mpos, shl(5, var_mpos)), 32))) sstore(0x00, mload(mload(add(var_s_mpos, 32))))
let _2, _3 := storage_array_index_access_struct_S_1252() if iszero(lt(1, mload(var_s_mpos))) { panic_error_0x32() }
sstore(_2, _1) let _1 := mload(mload(add(var_s_mpos, 64)))
if iszero(lt(0x01, mload(var_s_mpos))) { panic_error_0x32() } sstore(0x02, _1)
let _4 := mload(mload(add(var_s_mpos, 64))) var := _1
if iszero(lt(var_mpos, 0x02)) { panic_error_0x32() } let memPtr := mload(64)
let slot := add(0x02, var_mpos) let newFreePtr := add(memPtr, 160)
let _5 := sload(slot) if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
let shiftBits := shl(3, var_mpos) mstore(64, newFreePtr)
let mask := shl(shiftBits, not(0)) mstore(memPtr, 100)
sstore(slot, or(and(_5, not(mask)), and(shl(shiftBits, _4), mask))) mstore(add(memPtr, 32), "longstringlongstringlongstringlo")
let _6, _7 := storage_array_index_access_struct_S() mstore(add(memPtr, 64), "ngstringlongstringlongstringlong")
var := extract_from_storage_value_dynamict_uint256(sload(_6), _7) mstore(add(memPtr, 96), "stringlongstringlongstringlongst")
var_mpos := copy_literal_to_memory_64902fd228f7ef267f3b474dd6ef84bae434cf5546eee948e7ca26df3eda1927() mstore(add(memPtr, 128), "ring")
var_mpos := memPtr
} }
function panic_error_0x32() function panic_error_0x32()
{ {
@ -137,18 +121,6 @@ object "C_59" {
mstore(4, 0x41) mstore(4, 0x41)
revert(0, 0x24) revert(0, 0x24)
} }
function storage_array_index_access_struct_S_1252() -> slot, offset
{
if iszero(lt(offset, 0x02)) { panic_error_0x32() }
slot := add(offset, offset)
offset := offset
}
function storage_array_index_access_struct_S() -> slot, offset
{
if iszero(lt(offset, 0x02)) { panic_error_0x32() }
slot := add(0x02, offset)
offset := offset
}
} }
} }
} }

View File

@ -148,7 +148,7 @@ sub_0: assembly {
mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x51) mstore(0x04, 0x51)
revert(0x00, 0x24) revert(0x00, 0x24)
/* "#utility.yul":196:425 */ /* "#utility.yul":196:421 */
tag_22: tag_22:
/* "#utility.yul":236:239 */ /* "#utility.yul":236:239 */
0x00 0x00
@ -164,29 +164,35 @@ sub_0: assembly {
iszero iszero
tag_28 tag_28
jumpi jumpi
shl(0xe0, 0x4e487b71) /* "#utility.yul":312:322 */
/* "#utility.yul":293:326 */ 0x4e487b71
dup2 /* "#utility.yul":307:310 */
0xe0
/* "#utility.yul":303:323 */
shl
/* "#utility.yul":300:301 */
0x00
/* "#utility.yul":293:324 */
mstore mstore
/* "#utility.yul":349:353 */ /* "#utility.yul":347:351 */
0x11 0x11
/* "#utility.yul":346:347 */ /* "#utility.yul":344:345 */
0x04 0x04
/* "#utility.yul":339:354 */ /* "#utility.yul":337:352 */
mstore mstore
/* "#utility.yul":379:383 */ /* "#utility.yul":375:379 */
0x24 0x24
/* "#utility.yul":300:303 */ /* "#utility.yul":372:373 */
dup2 0x00
/* "#utility.yul":367:384 */ /* "#utility.yul":365:380 */
revert revert
/* "#utility.yul":254:256 */ /* "#utility.yul":254:256 */
tag_28: tag_28:
pop pop
/* "#utility.yul":410:419 */ /* "#utility.yul":406:415 */
add add
swap1 swap1
/* "#utility.yul":244:425 */ /* "#utility.yul":244:421 */
jump // out jump // out
auxdata: <AUXDATA REMOVED> auxdata: <AUXDATA REMOVED>

View File

@ -153,7 +153,7 @@ sub_0: assembly {
mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x51) mstore(0x04, 0x51)
revert(0x00, 0x24) revert(0x00, 0x24)
/* "#utility.yul":196:425 */ /* "#utility.yul":196:421 */
tag_19: tag_19:
/* "#utility.yul":236:239 */ /* "#utility.yul":236:239 */
0x00 0x00
@ -169,29 +169,35 @@ sub_0: assembly {
iszero iszero
tag_24 tag_24
jumpi jumpi
shl(0xe0, 0x4e487b71) /* "#utility.yul":312:322 */
/* "#utility.yul":293:326 */ 0x4e487b71
dup2 /* "#utility.yul":307:310 */
0xe0
/* "#utility.yul":303:323 */
shl
/* "#utility.yul":300:301 */
0x00
/* "#utility.yul":293:324 */
mstore mstore
/* "#utility.yul":349:353 */ /* "#utility.yul":347:351 */
0x11 0x11
/* "#utility.yul":346:347 */ /* "#utility.yul":344:345 */
0x04 0x04
/* "#utility.yul":339:354 */ /* "#utility.yul":337:352 */
mstore mstore
/* "#utility.yul":379:383 */ /* "#utility.yul":375:379 */
0x24 0x24
/* "#utility.yul":300:303 */ /* "#utility.yul":372:373 */
dup2 0x00
/* "#utility.yul":367:384 */ /* "#utility.yul":365:380 */
revert revert
/* "#utility.yul":254:256 */ /* "#utility.yul":254:256 */
tag_24: tag_24:
pop pop
/* "#utility.yul":410:419 */ /* "#utility.yul":406:415 */
add add
swap1 swap1
/* "#utility.yul":244:425 */ /* "#utility.yul":244:421 */
jump // out jump // out
auxdata: <AUXDATA REMOVED> auxdata: <AUXDATA REMOVED>

File diff suppressed because one or more lines are too long