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! *
|
|
|
|
*******************************************************/
|
|
|
|
|
2020-11-26 21:33:36 +00:00
|
|
|
object "C_3" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
2020-11-26 21:33:36 +00:00
|
|
|
let _1 := datasize("C_3_deployed")
|
|
|
|
codecopy(0, dataoffset("C_3_deployed"), _1)
|
2020-04-09 19:59:17 +00:00
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
2020-11-26 21:33:36 +00:00
|
|
|
object "C_3_deployed" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
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-11-26 21:33:36 +00:00
|
|
|
object "D_14" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
2020-11-26 21:33:36 +00:00
|
|
|
let _1 := datasize("D_14_deployed")
|
|
|
|
codecopy(0, dataoffset("D_14_deployed"), _1)
|
2020-04-09 19:59:17 +00:00
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
2020-11-26 21:33:36 +00:00
|
|
|
object "D_14_deployed" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
2020-04-09 19:59:17 +00:00
|
|
|
if iszero(lt(calldatasize(), 4))
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
let _1 := 0
|
|
|
|
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
2020-04-09 19:59:17 +00:00
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
if callvalue() { revert(_1, _1) }
|
|
|
|
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
2020-11-26 21:33:36 +00:00
|
|
|
let _2 := datasize("C_3")
|
2020-10-15 14:25:15 +00:00
|
|
|
let _3 := add(128, _2)
|
|
|
|
if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { invalid() }
|
2020-11-26 21:33:36 +00:00
|
|
|
datacopy(128, dataoffset("C_3"), _2)
|
2020-11-24 16:02:02 +00:00
|
|
|
if iszero(create(_1, 128, _2))
|
|
|
|
{
|
|
|
|
returndatacopy(_1, _1, returndatasize())
|
|
|
|
revert(_1, returndatasize())
|
|
|
|
}
|
2020-10-15 14:25:15 +00:00
|
|
|
return(allocateMemory(_1), _1)
|
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)
|
|
|
|
}
|
|
|
|
}
|
2020-11-26 21:33:36 +00:00
|
|
|
object "C_3" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
2020-04-09 19:59:17 +00:00
|
|
|
if callvalue() { revert(0, 0) }
|
2020-11-26 21:33:36 +00:00
|
|
|
let _1 := datasize("C_3_deployed")
|
|
|
|
codecopy(0, dataoffset("C_3_deployed"), _1)
|
2020-04-09 19:59:17 +00:00
|
|
|
return(0, _1)
|
|
|
|
}
|
|
|
|
}
|
2020-11-26 21:33:36 +00:00
|
|
|
object "C_3_deployed" {
|
2020-04-09 19:59:17 +00:00
|
|
|
code {
|
|
|
|
{
|
2020-10-15 14:25:15 +00:00
|
|
|
mstore(64, 128)
|
2020-04-09 19:59:17 +00:00
|
|
|
revert(0, 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|