mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactor conversion function.
This commit is contained in:
@@ -275,11 +275,7 @@ object \"C_54\" {
|
||||
}
|
||||
|
||||
function convert_t_contract$_C_$54_to_t_address(value) -> converted {
|
||||
converted := convert_t_contract$_C_$54_to_t_uint160(value)
|
||||
}
|
||||
|
||||
function convert_t_contract$_C_$54_to_t_uint160(value) -> converted {
|
||||
converted := cleanup_t_uint160(value)
|
||||
converted := convert_t_uint160_to_t_address(value)
|
||||
}
|
||||
|
||||
function convert_t_int256_to_t_int256(value) -> converted {
|
||||
@@ -290,6 +286,14 @@ object \"C_54\" {
|
||||
converted := cleanup_t_int256(value)
|
||||
}
|
||||
|
||||
function convert_t_uint160_to_t_address(value) -> converted {
|
||||
converted := convert_t_uint160_to_t_uint160(value)
|
||||
}
|
||||
|
||||
function convert_t_uint160_to_t_uint160(value) -> converted {
|
||||
converted := cleanup_t_uint160(value)
|
||||
}
|
||||
|
||||
function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value {
|
||||
value := cleanup_from_storage_t_int256(shift_right_unsigned_dynamic(mul(offset, 8), slot_value))
|
||||
}
|
||||
@@ -875,11 +879,7 @@ object \"D_72\" {
|
||||
}
|
||||
|
||||
function convert_t_contract$_C_$54_to_t_address(value) -> converted {
|
||||
converted := convert_t_contract$_C_$54_to_t_uint160(value)
|
||||
}
|
||||
|
||||
function convert_t_contract$_C_$54_to_t_uint160(value) -> converted {
|
||||
converted := cleanup_t_uint160(value)
|
||||
converted := convert_t_uint160_to_t_address(value)
|
||||
}
|
||||
|
||||
function convert_t_int256_to_t_int256(value) -> converted {
|
||||
@@ -890,6 +890,14 @@ object \"D_72\" {
|
||||
converted := cleanup_t_int256(value)
|
||||
}
|
||||
|
||||
function convert_t_uint160_to_t_address(value) -> converted {
|
||||
converted := convert_t_uint160_to_t_uint160(value)
|
||||
}
|
||||
|
||||
function convert_t_uint160_to_t_uint160(value) -> converted {
|
||||
converted := cleanup_t_uint160(value)
|
||||
}
|
||||
|
||||
function extract_from_storage_value_dynamict_int256(slot_value, offset) -> value {
|
||||
value := cleanup_from_storage_t_int256(shift_right_unsigned_dynamic(mul(offset, 8), slot_value))
|
||||
}
|
||||
|
||||
@@ -27,5 +27,5 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 9, 7
|
||||
// gas legacy: 121594
|
||||
// gas legacy: 125064
|
||||
// t2() -> 9
|
||||
|
||||
Reference in New Issue
Block a user