2020-04-09 19:59:17 +00:00
|
|
|
Optimized IR:
|
|
|
|
/*******************************************************
|
|
|
|
* WARNING *
|
|
|
|
* Solidity to Yul compilation is still EXPERIMENTAL *
|
|
|
|
* It can result in LOSS OF FUNDS or worse *
|
|
|
|
* !USE AT YOUR OWN RISK! *
|
|
|
|
*******************************************************/
|
|
|
|
|
|
|
|
object "C_2" {
|
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
mstore(64, memoryguard(0x80))
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
|
|
|
let _1 := datasize("C_2_deployed")
|
|
|
|
codecopy(0, dataoffset("C_2_deployed"), _1)
|
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
object "C_2_deployed" {
|
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
mstore(64, memoryguard(0x80))
|
2020-04-09 19:59:17 +00:00
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Optimized IR:
|
|
|
|
/*******************************************************
|
|
|
|
* WARNING *
|
|
|
|
* Solidity to Yul compilation is still EXPERIMENTAL *
|
|
|
|
* It can result in LOSS OF FUNDS or worse *
|
|
|
|
* !USE AT YOUR OWN RISK! *
|
|
|
|
*******************************************************/
|
|
|
|
|
2020-08-31 15:37:03 +00:00
|
|
|
object "D_15" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
mstore(64, memoryguard(0x80))
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
2020-08-31 15:37:03 +00:00
|
|
|
let _1 := datasize("D_15_deployed")
|
|
|
|
codecopy(0, dataoffset("D_15_deployed"), _1)
|
2020-04-09 19:59:17 +00:00
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
2020-08-31 15:37:03 +00:00
|
|
|
object "D_15_deployed" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
let _1 := memoryguard(0x80)
|
|
|
|
mstore(64, _1)
|
2020-04-09 19:59:17 +00:00
|
|
|
if iszero(lt(calldatasize(), 4))
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
let _2 := 0
|
|
|
|
if eq(0x26121ff0, shr(224, calldataload(_2)))
|
2020-04-09 19:59:17 +00:00
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
if callvalue() { revert(_2, _2) }
|
|
|
|
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
|
|
|
|
let _3 := datasize("C_2")
|
|
|
|
let _4 := add(_1, _3)
|
2020-09-24 13:45:45 +00:00
|
|
|
if or(gt(_4, 0xffffffffffffffff), lt(_4, _1)) { invalid() }
|
2020-07-02 10:48:20 +00:00
|
|
|
datacopy(_1, dataoffset("C_2"), _3)
|
|
|
|
pop(create(_2, _1, sub(_4, _1)))
|
|
|
|
return(allocateMemory(_2), _2)
|
2020-04-09 19:59:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
function allocateMemory(size) -> memPtr
|
|
|
|
{
|
|
|
|
memPtr := mload(64)
|
|
|
|
let newFreePtr := add(memPtr, size)
|
2020-09-24 13:45:45 +00:00
|
|
|
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { invalid() }
|
2020-04-09 19:59:17 +00:00
|
|
|
mstore(64, newFreePtr)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
object "C_2" {
|
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
mstore(64, memoryguard(0x80))
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
|
|
|
let _1 := datasize("C_2_deployed")
|
|
|
|
codecopy(0, dataoffset("C_2_deployed"), _1)
|
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
object "C_2_deployed" {
|
|
|
|
code {
|
|
|
|
{
|
2020-07-02 10:48:20 +00:00
|
|
|
mstore(64, memoryguard(0x80))
|
2020-04-09 19:59:17 +00:00
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|