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)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-03-17 22:31:56 +00:00
|
|
|
// step: ssaPlusCleanup
|
|
|
|
//
|
2018-10-23 13:55:48 +00:00
|
|
|
// {
|
|
|
|
// function copy(from, to) -> length
|
|
|
|
// {
|
2019-09-07 19:14:25 +00:00
|
|
|
// let from_6 := from
|
|
|
|
// let to_7 := to
|
|
|
|
// let length_1 := mload(from_6)
|
2018-10-23 13:55:48 +00:00
|
|
|
// length := length_1
|
2019-09-07 19:14:25 +00:00
|
|
|
// mstore(to_7, length_1)
|
|
|
|
// let from_2 := add(from_6, 0x20)
|
|
|
|
// let to_3 := add(to_7, 0x20)
|
2019-04-05 18:38:23 +00:00
|
|
|
// let x_4 := 1
|
|
|
|
// let x := x_4
|
2019-05-08 10:41:19 +00:00
|
|
|
// for { }
|
2018-10-23 13:55:48 +00:00
|
|
|
// lt(x, length_1)
|
|
|
|
// {
|
2019-09-07 19:14:25 +00:00
|
|
|
// let x_9 := x
|
|
|
|
// let x_5 := add(x_9, 0x20)
|
2018-11-07 18:27:15 +00:00
|
|
|
// x := x_5
|
2018-10-23 13:55:48 +00:00
|
|
|
// }
|
|
|
|
// {
|
2019-09-07 19:14:25 +00:00
|
|
|
// let x_8 := x
|
|
|
|
// mstore(add(to_3, x_8), mload(add(from_2, x_8)))
|
2018-10-23 13:55:48 +00:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|