2018-10-23 13:55:48 +00:00
|
|
|
{
|
|
|
|
function copy(from, to) -> length {
|
|
|
|
length := mload(from)
|
|
|
|
mstore(to, length)
|
|
|
|
from := add(from, 0x20)
|
|
|
|
to := add(to, 0x20)
|
2019-04-05 18:38:23 +00:00
|
|
|
let x := 1
|
|
|
|
for { } lt(x, length) { x := add(x, 0x20) } {
|
2018-10-23 13:55:48 +00:00
|
|
|
mstore(add(to, x), mload(add(from, x)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-01 14:33:46 +00:00
|
|
|
// ====
|
|
|
|
// step: ssaPlusCleanup
|
2018-10-23 13:55:48 +00:00
|
|
|
// ----
|
|
|
|
// {
|
|
|
|
// function copy(from, to) -> length
|
|
|
|
// {
|
|
|
|
// let length_1 := mload(from)
|
|
|
|
// length := length_1
|
|
|
|
// mstore(to, length_1)
|
2018-11-07 18:27:15 +00:00
|
|
|
// let from_2 := add(from, 0x20)
|
|
|
|
// let to_3 := add(to, 0x20)
|
2019-04-05 18:38:23 +00:00
|
|
|
// let x_4 := 1
|
|
|
|
// let x := x_4
|
2018-10-23 13:55:48 +00:00
|
|
|
// for {
|
|
|
|
// }
|
|
|
|
// lt(x, length_1)
|
|
|
|
// {
|
2018-11-07 18:27:15 +00:00
|
|
|
// let x_5 := add(x, 0x20)
|
|
|
|
// x := x_5
|
2018-10-23 13:55:48 +00:00
|
|
|
// }
|
|
|
|
// {
|
2018-11-07 18:27:15 +00:00
|
|
|
// mstore(add(to_3, x), mload(add(from_2, x)))
|
2018-10-23 13:55:48 +00:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|