mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update tests.
This commit is contained in:
@@ -38,7 +38,7 @@ object \"C_11\" {
|
||||
if callvalue() { revert(0, 0) }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocateMemory(0)
|
||||
let memPos := allocate_memory(0)
|
||||
let memEnd := abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
@@ -64,12 +64,13 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function allocateMemory(size) -> memPtr {
|
||||
function allocate_memory(size) -> memPtr {
|
||||
memPtr := allocate_unbounded()
|
||||
finalize_allocation(memPtr, size)
|
||||
}
|
||||
|
||||
function allocate_unbounded() -> memPtr {
|
||||
memPtr := mload(64)
|
||||
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
|
||||
// protect against overflow
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
|
||||
mstore(64, newFreePtr)
|
||||
}
|
||||
|
||||
function cleanup_t_bytes32(value) -> cleaned {
|
||||
@@ -80,6 +81,13 @@ object \"C_11\" {
|
||||
converted := 0x6162636162630000000000000000000000000000000000000000000000000000
|
||||
}
|
||||
|
||||
function finalize_allocation(memPtr, size) {
|
||||
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
|
||||
// protect against overflow
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
|
||||
mstore(64, newFreePtr)
|
||||
}
|
||||
|
||||
function fun_f_10() -> vloc__5 {
|
||||
let zero_value_for_type_t_bytes32_1 := zero_value_for_split_t_bytes32()
|
||||
vloc__5 := zero_value_for_type_t_bytes32_1
|
||||
|
||||
Reference in New Issue
Block a user