mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12206 from ethereum/extractExternalFunctionPart
Extract external function part
This commit is contained in:
commit
ebd584fcfb
@ -41,6 +41,14 @@ YulArity YulArity::fromType(FunctionType const& _functionType)
|
||||
};
|
||||
}
|
||||
|
||||
string IRNames::externalFunctionABIWrapper(Declaration const& _functionOrVarDecl)
|
||||
{
|
||||
if (auto const* function = dynamic_cast<FunctionDefinition const*>(&_functionOrVarDecl))
|
||||
solAssert(!function->isConstructor());
|
||||
|
||||
return "external_fun_" + _functionOrVarDecl.name() + "_" + to_string(_functionOrVarDecl.id());
|
||||
}
|
||||
|
||||
string IRNames::function(FunctionDefinition const& _function)
|
||||
{
|
||||
if (_function.isConstructor())
|
||||
|
@ -49,6 +49,7 @@ struct YulArity
|
||||
|
||||
struct IRNames
|
||||
{
|
||||
static std::string externalFunctionABIWrapper(Declaration const& _functionOrVardecl);
|
||||
static std::string function(FunctionDefinition const& _function);
|
||||
static std::string function(VariableDeclaration const& _varDecl);
|
||||
static std::string modifierInvocation(ModifierInvocation const& _modifierInvocation);
|
||||
|
@ -735,6 +735,44 @@ string IRGenerator::generateGetter(VariableDeclaration const& _varDecl)
|
||||
});
|
||||
}
|
||||
|
||||
string IRGenerator::generateExternalFunction(ContractDefinition const& _contract, FunctionType const& _functionType)
|
||||
{
|
||||
string functionName = IRNames::externalFunctionABIWrapper(_functionType.declaration());
|
||||
return m_context.functionCollector().createFunction(functionName, [&](vector<string>&, vector<string>&) -> string {
|
||||
Whiskers t(R"X(
|
||||
<callValueCheck>
|
||||
<?+params>let <params> := </+params> <abiDecode>(4, calldatasize())
|
||||
<?+retParams>let <retParams> := </+retParams> <function>(<params>)
|
||||
let memPos := <allocateUnbounded>()
|
||||
let memEnd := <abiEncode>(memPos <?+retParams>,</+retParams> <retParams>)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
)X");
|
||||
t("callValueCheck", (_functionType.isPayable() || _contract.isLibrary()) ? "" : callValueCheck());
|
||||
|
||||
unsigned paramVars = make_shared<TupleType>(_functionType.parameterTypes())->sizeOnStack();
|
||||
unsigned retVars = make_shared<TupleType>(_functionType.returnParameterTypes())->sizeOnStack();
|
||||
|
||||
ABIFunctions abiFunctions(m_evmVersion, m_context.revertStrings(), m_context.functionCollector());
|
||||
t("abiDecode", abiFunctions.tupleDecoder(_functionType.parameterTypes()));
|
||||
t("params", suffixedVariableNameList("param_", 0, paramVars));
|
||||
t("retParams", suffixedVariableNameList("ret_", 0, retVars));
|
||||
|
||||
if (FunctionDefinition const* funDef = dynamic_cast<FunctionDefinition const*>(&_functionType.declaration()))
|
||||
{
|
||||
solAssert(!funDef->isConstructor());
|
||||
t("function", m_context.enqueueFunctionForCodeGeneration(*funDef));
|
||||
}
|
||||
else if (VariableDeclaration const* varDecl = dynamic_cast<VariableDeclaration const*>(&_functionType.declaration()))
|
||||
t("function", generateGetter(*varDecl));
|
||||
else
|
||||
solAssert(false, "Unexpected declaration for function!");
|
||||
|
||||
t("allocateUnbounded", m_utils.allocateUnboundedFunction());
|
||||
t("abiEncode", abiFunctions.tupleEncoder(_functionType.returnParameterTypes(), _functionType.returnParameterTypes(), _contract.isLibrary()));
|
||||
return t.render();
|
||||
});
|
||||
}
|
||||
|
||||
string IRGenerator::generateInitialAssignment(VariableDeclaration const& _varDecl)
|
||||
{
|
||||
IRGeneratorForStatements generator(m_context, m_utils);
|
||||
@ -976,12 +1014,7 @@ string IRGenerator::dispatchRoutine(ContractDefinition const& _contract)
|
||||
{
|
||||
// <functionName>
|
||||
<delegatecallCheck>
|
||||
<callValueCheck>
|
||||
<?+params>let <params> := </+params> <abiDecode>(4, calldatasize())
|
||||
<?+retParams>let <retParams> := </+retParams> <function>(<params>)
|
||||
let memPos := <allocateUnbounded>()
|
||||
let memEnd := <abiEncode>(memPos <?+retParams>,</+retParams> <retParams>)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
<externalFunction>()
|
||||
}
|
||||
</cases>
|
||||
default {}
|
||||
@ -1011,25 +1044,8 @@ string IRGenerator::dispatchRoutine(ContractDefinition const& _contract)
|
||||
"() }";
|
||||
}
|
||||
templ["delegatecallCheck"] = delegatecallCheck;
|
||||
templ["callValueCheck"] = (type->isPayable() || _contract.isLibrary()) ? "" : callValueCheck();
|
||||
|
||||
unsigned paramVars = make_shared<TupleType>(type->parameterTypes())->sizeOnStack();
|
||||
unsigned retVars = make_shared<TupleType>(type->returnParameterTypes())->sizeOnStack();
|
||||
|
||||
ABIFunctions abiFunctions(m_evmVersion, m_context.revertStrings(), m_context.functionCollector());
|
||||
templ["abiDecode"] = abiFunctions.tupleDecoder(type->parameterTypes());
|
||||
templ["params"] = suffixedVariableNameList("param_", 0, paramVars);
|
||||
templ["retParams"] = suffixedVariableNameList("ret_", 0, retVars);
|
||||
|
||||
if (FunctionDefinition const* funDef = dynamic_cast<FunctionDefinition const*>(&type->declaration()))
|
||||
templ["function"] = m_context.enqueueFunctionForCodeGeneration(*funDef);
|
||||
else if (VariableDeclaration const* varDecl = dynamic_cast<VariableDeclaration const*>(&type->declaration()))
|
||||
templ["function"] = generateGetter(*varDecl);
|
||||
else
|
||||
solAssert(false, "Unexpected declaration for function!");
|
||||
|
||||
templ["allocateUnbounded"] = m_utils.allocateUnboundedFunction();
|
||||
templ["abiEncode"] = abiFunctions.tupleEncoder(type->returnParameterTypes(), type->returnParameterTypes(), _contract.isLibrary());
|
||||
templ["externalFunction"] = generateExternalFunction(_contract, *type);
|
||||
}
|
||||
t("cases", functions);
|
||||
FunctionDefinition const* etherReceiver = _contract.receiveFunction();
|
||||
|
@ -102,6 +102,9 @@ private:
|
||||
/// Generates a getter for the given declaration and returns its name
|
||||
std::string generateGetter(VariableDeclaration const& _varDecl);
|
||||
|
||||
/// Generates the external part (ABI decoding and encoding) of a function or getter.
|
||||
std::string generateExternalFunction(ContractDefinition const& _contract, FunctionType const& _functionType);
|
||||
|
||||
/// Generates code that assigns the initial value of the respective type.
|
||||
std::string generateInitialAssignment(VariableDeclaration const& _varDecl);
|
||||
|
||||
|
@ -108,12 +108,7 @@ object "C_6" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -150,6 +145,17 @@ object "C_6" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -108,12 +108,7 @@ object "C_6" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -150,6 +145,17 @@ object "C_6" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -101,12 +101,7 @@ object "C_6" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -143,6 +138,17 @@ object "C_6" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -158,12 +158,7 @@ object "D_27" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_26()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_26()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -238,6 +233,17 @@ object "D_27" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_26() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_26()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
@ -484,7 +490,7 @@ object "D_27" {
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
mstore(add(allocate_memory_array_string(), 32), "/*")
|
||||
let memPtr := allocate_memory_array_string_480()
|
||||
let memPtr := allocate_memory_array_string_546()
|
||||
mstore(add(memPtr, 32), 0x2f2a2a204073726320303a39363a313635202022636f6e74726163742044207b)
|
||||
mstore(add(memPtr, 64), shl(200, 0x2e2e2e22202a2f))
|
||||
let memPos := mload(64)
|
||||
@ -525,7 +531,7 @@ object "D_27" {
|
||||
memPtr := memPtr_1
|
||||
mstore(memPtr_1, 2)
|
||||
}
|
||||
function allocate_memory_array_string_480() -> memPtr
|
||||
function allocate_memory_array_string_546() -> memPtr
|
||||
{
|
||||
let memPtr_1 := mload(64)
|
||||
let newFreePtr := add(memPtr_1, 96)
|
||||
|
@ -53,12 +53,7 @@ object "C_81" {
|
||||
{
|
||||
// f(uint256,uint256,uint256,uint256)
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
let param_0, param_1, param_2, param_3 := abi_decode_tuple_t_uint256t_uint256t_uint256t_uint256(4, calldatasize())
|
||||
let ret_0, ret_1, ret_2, ret_3 := fun_f_80(param_0, param_1, param_2, param_3)
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_uint256_t_int256_t_uint256_t_uint256__to_t_uint256_t_int256_t_uint256_t_uint256__fromStack(memPos , ret_0, ret_1, ret_2, ret_3)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_80()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -160,6 +155,17 @@ object "C_81" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_80() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
let param_0, param_1, param_2, param_3 := abi_decode_tuple_t_uint256t_uint256t_uint256t_uint256(4, calldatasize())
|
||||
let ret_0, ret_1, ret_2, ret_3 := fun_f_80(param_0, param_1, param_2, param_3)
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_uint256_t_int256_t_uint256_t_uint256__to_t_uint256_t_int256_t_uint256_t_uint256__fromStack(memPos , ret_0, ret_1, ret_2, ret_3)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -7,157 +7,169 @@
|
||||
{
|
||||
"abi_decode_tuple_":
|
||||
{
|
||||
"entryPoint": 216,
|
||||
"entryPoint": 122,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"abi_encode_t_uint256_to_t_uint256_fromStack":
|
||||
{
|
||||
"entryPoint": 250,
|
||||
"entryPoint": 156,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack":
|
||||
{
|
||||
"entryPoint": 265,
|
||||
"entryPoint": 171,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"allocate_unbounded":
|
||||
{
|
||||
"entryPoint": 196,
|
||||
"entryPoint": 102,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"cleanup_t_uint256":
|
||||
{
|
||||
"entryPoint": 240,
|
||||
"entryPoint": 146,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"convert_t_uint256_to_t_uint256":
|
||||
{
|
||||
"entryPoint": 391,
|
||||
"entryPoint": 413,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"external_fun_f_25":
|
||||
{
|
||||
"entryPoint": 198,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"external_fun_g_36":
|
||||
{
|
||||
"entryPoint": 256,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"fun_f_25":
|
||||
{
|
||||
"entryPoint": 658,
|
||||
"entryPoint": 680,
|
||||
"id": 25,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"fun_f_25_inner":
|
||||
{
|
||||
"entryPoint": 624,
|
||||
"entryPoint": 646,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"fun_g_36":
|
||||
{
|
||||
"entryPoint": 874,
|
||||
"entryPoint": 896,
|
||||
"id": 36,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"fun_g_36_inner":
|
||||
{
|
||||
"entryPoint": 840,
|
||||
"entryPoint": 862,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"identity":
|
||||
{
|
||||
"entryPoint": 381,
|
||||
"entryPoint": 403,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"modifier_m_17":
|
||||
{
|
||||
"entryPoint": 470,
|
||||
"entryPoint": 492,
|
||||
"id": 14,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"modifier_m_19":
|
||||
{
|
||||
"entryPoint": 547,
|
||||
"entryPoint": 569,
|
||||
"id": 14,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"modifier_m_28":
|
||||
{
|
||||
"entryPoint": 686,
|
||||
"entryPoint": 708,
|
||||
"id": 14,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"modifier_m_30":
|
||||
{
|
||||
"entryPoint": 763,
|
||||
"entryPoint": 785,
|
||||
"id": 14,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"prepare_store_t_uint256":
|
||||
{
|
||||
"entryPoint": 425,
|
||||
"entryPoint": 447,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74":
|
||||
{
|
||||
"entryPoint": 292,
|
||||
"entryPoint": 314,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb":
|
||||
{
|
||||
"entryPoint": 206,
|
||||
"entryPoint": 112,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b":
|
||||
{
|
||||
"entryPoint": 211,
|
||||
"entryPoint": 117,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"shift_left_0":
|
||||
{
|
||||
"entryPoint": 302,
|
||||
"entryPoint": 324,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"shift_right_224_unsigned":
|
||||
{
|
||||
"entryPoint": 183,
|
||||
"entryPoint": 89,
|
||||
"parameterSlots": 1,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"update_byte_slice_32_shift_0":
|
||||
{
|
||||
"entryPoint": 315,
|
||||
"entryPoint": 337,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"update_storage_value_offset_0t_uint256_to_t_uint256":
|
||||
{
|
||||
"entryPoint": 435,
|
||||
"entryPoint": 457,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 0
|
||||
},
|
||||
"usr$f":
|
||||
{
|
||||
"entryPoint": 493,
|
||||
"entryPoint": 515,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 1
|
||||
},
|
||||
"zero_value_for_split_t_uint256":
|
||||
{
|
||||
"entryPoint": 297,
|
||||
"entryPoint": 319,
|
||||
"parameterSlots": 0,
|
||||
"returnSlots": 1
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ object "C_59" {
|
||||
for { } lt(src, srcEnd) { src := add(src, _2) }
|
||||
{
|
||||
if slt(sub(calldatasize(), src), _2) { revert(_1, _1) }
|
||||
let value := allocate_memory_1172()
|
||||
let value := allocate_memory_1307()
|
||||
mstore(value, calldataload(src))
|
||||
mstore(dst, value)
|
||||
dst := add(dst, _2)
|
||||
@ -68,7 +68,7 @@ object "C_59" {
|
||||
mstore(4, 0x41)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
function allocate_memory_1172() -> memPtr
|
||||
function allocate_memory_1307() -> memPtr
|
||||
{
|
||||
memPtr := mload(64)
|
||||
let newFreePtr := add(memPtr, 32)
|
||||
|
@ -68,12 +68,7 @@ object "C_15" {
|
||||
{
|
||||
// f(uint256[][],uint8)
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
let param_0, param_1 := abi_decode_tuple_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptrt_enum$_E_$3(4, calldatasize())
|
||||
fun_f_14(param_0, param_1)
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_14()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -338,6 +333,17 @@ object "C_15" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_14() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
let param_0, param_1 := abi_decode_tuple_t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptrt_enum$_E_$3(4, calldatasize())
|
||||
fun_f_14(param_0, param_1)
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
|
||||
let start := allocate_unbounded()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -114,12 +114,7 @@ object \"C_6\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -156,6 +151,17 @@ object \"C_6\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -114,12 +114,7 @@ object \"C_6\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -156,6 +151,17 @@ object \"C_6\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -107,12 +107,7 @@ object \"C_6\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -149,6 +144,17 @@ object \"C_6\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -172,48 +172,28 @@ object \"C_54\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_30()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_30()
|
||||
}
|
||||
|
||||
case 0x793816ec
|
||||
{
|
||||
// stateVar()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_stateVar_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_stateVar_10()
|
||||
}
|
||||
|
||||
case 0x9942ec6f
|
||||
{
|
||||
// f2()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f2_53()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f2_53()
|
||||
}
|
||||
|
||||
case 0xa00b982b
|
||||
{
|
||||
// constVar()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_constVar_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_constVar_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -260,6 +240,17 @@ object \"C_54\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_30() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_30()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function shift_right_unsigned_dynamic(bits, value) -> newValue {
|
||||
newValue :=
|
||||
|
||||
@ -292,6 +283,28 @@ object \"C_54\" {
|
||||
}
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
|
||||
function external_fun_stateVar_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_stateVar_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f2_53() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f2_53()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function cleanup_t_rational_41_by_1(value) -> cleaned {
|
||||
cleaned := value
|
||||
}
|
||||
@ -320,6 +333,17 @@ object \"C_54\" {
|
||||
}
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
|
||||
function external_fun_constVar_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_constVar_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
@ -638,62 +662,97 @@ object \"C_54\" {
|
||||
switch shr(224, calldataload(_1))
|
||||
case 0x26121ff0 {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret := /** @src 0:286:305 \"constVar + immutVar\" */ checked_add_int256_556(/** @src 0:297:305 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
/// @src 0:297:305 \"immutVar\"
|
||||
let _2 := loadimmutable(\"8\")
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() }
|
||||
let memPos := mload(64)
|
||||
return(memPos, sub(abi_encode_int256(memPos, ret), memPos))
|
||||
}
|
||||
case 0x793816ec {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret_1 := sload(_1)
|
||||
let memPos_1 := mload(64)
|
||||
return(memPos_1, sub(abi_encode_int256(memPos_1, ret_1), memPos_1))
|
||||
}
|
||||
case 0x9942ec6f {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret_2 := /** @src 0:382:385 \"int\" */ modifier_m()
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let memPos_2 := mload(64)
|
||||
return(memPos_2, sub(abi_encode_int256(memPos_2, ret_2), memPos_2))
|
||||
}
|
||||
case 0xa00b982b {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let memPos_3 := mload(64)
|
||||
return(memPos_3, sub(abi_encode_int256_555(memPos_3), memPos_3))
|
||||
mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ _2))
|
||||
return(memPos, 32)
|
||||
}
|
||||
case 0x793816ec { external_fun_stateVar() }
|
||||
case 0x9942ec6f { external_fun_f2() }
|
||||
case 0xa00b982b { external_fun_constVar() }
|
||||
}
|
||||
revert(0, 0)
|
||||
}
|
||||
function abi_decode(dataEnd)
|
||||
{
|
||||
if slt(add(dataEnd, not(3)), 0) { revert(0, 0) }
|
||||
}
|
||||
function abi_encode_int256_555(headStart) -> tail
|
||||
{
|
||||
tail := add(headStart, 32)
|
||||
mstore(headStart, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
}
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
function abi_encode_int256(headStart, value0) -> tail
|
||||
{
|
||||
tail := add(headStart, 32)
|
||||
mstore(headStart, value0)
|
||||
}
|
||||
function external_fun_stateVar()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _1 := sload(0)
|
||||
let memPos := mload(64)
|
||||
mstore(memPos, _1)
|
||||
return(memPos, 32)
|
||||
}
|
||||
function external_fun_f2()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := 0
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
let _2 := sload(_1)
|
||||
if eq(_2, sub(shl(255, 1), 1)) { panic_error_0x11() }
|
||||
let ret := add(_2, 1)
|
||||
sstore(_1, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _3 := /** @src 0:79:435 \"contract C...\" */ mload(64)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_3, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _4 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _3, /** @src 0:79:435 \"contract C...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _3, 32)
|
||||
if iszero(_4)
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _1, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 0:79:435 \"contract C...\" */ _1
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _4
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let newFreePtr := add(_3, and(add(/** @src 0:410:418 \"this.f()\" */ returndatasize(), /** @src 0:79:435 \"contract C...\" */ 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _3))
|
||||
{
|
||||
mstore(_1, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_1, 0x24)
|
||||
}
|
||||
mstore(64, newFreePtr)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := abi_decode_int256_fromMemory(_3, add(_3, returndatasize()))
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
/// @src 0:392:429 \"return stateVar + this.f() + immutVar\"
|
||||
let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let memPos := mload(64)
|
||||
return(memPos, sub(abi_encode_int256(memPos, var), memPos))
|
||||
}
|
||||
function external_fun_constVar()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let memPos := mload(64)
|
||||
mstore(memPos, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
return(memPos, 32)
|
||||
}
|
||||
function panic_error_0x11()
|
||||
{
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
function checked_add_int256_556(y) -> sum
|
||||
{
|
||||
if and(1, sgt(y, sub(shl(255, 1), 42))) { panic_error_0x11() }
|
||||
sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 0:79:435 \"contract C...\" */ y)
|
||||
}
|
||||
function checked_add_int256(x, y) -> sum
|
||||
{
|
||||
let _1 := slt(x, 0)
|
||||
@ -701,51 +760,6 @@ object \"C_54\" {
|
||||
if and(_1, slt(y, sub(shl(255, 1), x))) { panic_error_0x11() }
|
||||
sum := add(x, y)
|
||||
}
|
||||
/// @ast-id 37 @src 0:311:348 \"modifier m()...\"
|
||||
function modifier_m() -> _1
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let _2 := 0
|
||||
let _3 := sload(_2)
|
||||
if eq(_3, sub(shl(255, 1), 1)) { panic_error_0x11() }
|
||||
let ret := add(_3, 1)
|
||||
sstore(_2, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _4 := /** @src 0:79:435 \"contract C...\" */ mload(64)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_4, /** @src 0:79:435 \"contract C...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _5 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _4, 4, _4, 32)
|
||||
if iszero(_5)
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _2, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 0:79:435 \"contract C...\" */ _2
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _5
|
||||
{
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
let newFreePtr := add(_4, and(add(/** @src 0:410:418 \"this.f()\" */ returndatasize(), /** @src 0:79:435 \"contract C...\" */ 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4))
|
||||
{
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(/** @src 0:410:418 \"this.f()\" */ 4, /** @src 0:79:435 \"contract C...\" */ 0x41)
|
||||
revert(_2, 0x24)
|
||||
}
|
||||
mstore(64, newFreePtr)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := abi_decode_int256_fromMemory(_4, add(_4, returndatasize()))
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
/// @src 0:343:344 \"_\"
|
||||
_1 := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
}
|
||||
/// @src 0:79:435 \"contract C...\"
|
||||
function abi_decode_int256_fromMemory(headStart, dataEnd) -> value0
|
||||
{
|
||||
if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }
|
||||
@ -997,48 +1011,28 @@ object \"D_72\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_30()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_30()
|
||||
}
|
||||
|
||||
case 0x793816ec
|
||||
{
|
||||
// stateVar()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_stateVar_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_stateVar_10()
|
||||
}
|
||||
|
||||
case 0x9942ec6f
|
||||
{
|
||||
// f2()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f2_53()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f2_53()
|
||||
}
|
||||
|
||||
case 0xa00b982b
|
||||
{
|
||||
// constVar()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_constVar_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_constVar_5()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -1085,6 +1079,17 @@ object \"D_72\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_30() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_30()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function shift_right_unsigned_dynamic(bits, value) -> newValue {
|
||||
newValue :=
|
||||
|
||||
@ -1117,6 +1122,28 @@ object \"D_72\" {
|
||||
}
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
|
||||
function external_fun_stateVar_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_stateVar_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f2_53() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f2_53()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function cleanup_t_rational_41_by_1(value) -> cleaned {
|
||||
cleaned := value
|
||||
}
|
||||
@ -1145,6 +1172,17 @@ object \"D_72\" {
|
||||
}
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
|
||||
function external_fun_constVar_5() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := getter_fun_constVar_5()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_int256__to_t_int256__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
@ -1471,62 +1509,97 @@ object \"D_72\" {
|
||||
switch shr(224, calldataload(_1))
|
||||
case 0x26121ff0 {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret := /** @src 0:286:305 \"constVar + immutVar\" */ checked_add_int256_556(/** @src 0:297:305 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
/// @src 0:297:305 \"immutVar\"
|
||||
let _2 := loadimmutable(\"8\")
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
if and(1, sgt(_2, sub(shl(255, 1), 42))) { panic_error_0x11() }
|
||||
let memPos := mload(64)
|
||||
return(memPos, sub(abi_encode_int256(memPos, ret), memPos))
|
||||
}
|
||||
case 0x793816ec {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret_1 := sload(_1)
|
||||
let memPos_1 := mload(64)
|
||||
return(memPos_1, sub(abi_encode_int256(memPos_1, ret_1), memPos_1))
|
||||
}
|
||||
case 0x9942ec6f {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let ret_2 := /** @src 0:382:385 \"int\" */ modifier_m()
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let memPos_2 := mload(64)
|
||||
return(memPos_2, sub(abi_encode_int256(memPos_2, ret_2), memPos_2))
|
||||
}
|
||||
case 0xa00b982b {
|
||||
if callvalue() { revert(_1, _1) }
|
||||
abi_decode(calldatasize())
|
||||
let memPos_3 := mload(64)
|
||||
return(memPos_3, sub(abi_encode_int256_555(memPos_3), memPos_3))
|
||||
mstore(memPos, add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ _2))
|
||||
return(memPos, 32)
|
||||
}
|
||||
case 0x793816ec { external_fun_stateVar() }
|
||||
case 0x9942ec6f { external_fun_f2() }
|
||||
case 0xa00b982b { external_fun_constVar() }
|
||||
}
|
||||
revert(0, 0)
|
||||
}
|
||||
function abi_decode(dataEnd)
|
||||
{
|
||||
if slt(add(dataEnd, not(3)), 0) { revert(0, 0) }
|
||||
}
|
||||
function abi_encode_int256_555(headStart) -> tail
|
||||
{
|
||||
tail := add(headStart, 32)
|
||||
mstore(headStart, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
}
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
function abi_encode_int256(headStart, value0) -> tail
|
||||
{
|
||||
tail := add(headStart, 32)
|
||||
mstore(headStart, value0)
|
||||
}
|
||||
function external_fun_stateVar()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let _1 := sload(0)
|
||||
let memPos := mload(64)
|
||||
mstore(memPos, _1)
|
||||
return(memPos, 32)
|
||||
}
|
||||
function external_fun_f2()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := 0
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
let _2 := sload(_1)
|
||||
if eq(_2, sub(shl(255, 1), 1)) { panic_error_0x11() }
|
||||
let ret := add(_2, 1)
|
||||
sstore(_1, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _3 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(64)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_3, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _4 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _3, /** @src 1:91:166 \"contract D is C(3)...\" */ 4, /** @src 0:410:418 \"this.f()\" */ _3, 32)
|
||||
if iszero(_4)
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _1, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _1
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _4
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let newFreePtr := add(_3, and(add(/** @src 0:410:418 \"this.f()\" */ returndatasize(), /** @src 1:91:166 \"contract D is C(3)...\" */ 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _3))
|
||||
{
|
||||
mstore(_1, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x41)
|
||||
revert(_1, 0x24)
|
||||
}
|
||||
mstore(64, newFreePtr)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := abi_decode_int256_fromMemory(_3, add(_3, returndatasize()))
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
/// @src 0:392:429 \"return stateVar + this.f() + immutVar\"
|
||||
let var := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let memPos := mload(64)
|
||||
return(memPos, sub(abi_encode_int256(memPos, var), memPos))
|
||||
}
|
||||
function external_fun_constVar()
|
||||
{
|
||||
if callvalue() { revert(0, 0) }
|
||||
if slt(add(calldatasize(), not(3)), 0) { revert(0, 0) }
|
||||
let memPos := mload(64)
|
||||
mstore(memPos, /** @src 0:124:126 \"41\" */ 0x29)
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
return(memPos, 32)
|
||||
}
|
||||
function panic_error_0x11()
|
||||
{
|
||||
mstore(0, shl(224, 0x4e487b71))
|
||||
mstore(4, 0x11)
|
||||
revert(0, 0x24)
|
||||
}
|
||||
function checked_add_int256_556(y) -> sum
|
||||
{
|
||||
if and(1, sgt(y, sub(shl(255, 1), 42))) { panic_error_0x11() }
|
||||
sum := add(/** @src 0:124:126 \"41\" */ 0x29, /** @src 1:91:166 \"contract D is C(3)...\" */ y)
|
||||
}
|
||||
function checked_add_int256(x, y) -> sum
|
||||
{
|
||||
let _1 := slt(x, 0)
|
||||
@ -1534,51 +1607,6 @@ object \"D_72\" {
|
||||
if and(_1, slt(y, sub(shl(255, 1), x))) { panic_error_0x11() }
|
||||
sum := add(x, y)
|
||||
}
|
||||
/// @ast-id 37 @src 0:311:348 \"modifier m()...\"
|
||||
function modifier_m() -> _1
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let _2 := 0
|
||||
let _3 := sload(_2)
|
||||
if eq(_3, sub(shl(255, 1), 1)) { panic_error_0x11() }
|
||||
let ret := add(_3, 1)
|
||||
sstore(_2, ret)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _4 := /** @src 1:91:166 \"contract D is C(3)...\" */ mload(64)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
mstore(_4, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(228, 0x026121ff))
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let _5 := staticcall(gas(), /** @src 0:410:414 \"this\" */ address(), /** @src 0:410:418 \"this.f()\" */ _4, 4, _4, 32)
|
||||
if iszero(_5)
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let pos := mload(64)
|
||||
returndatacopy(pos, _2, returndatasize())
|
||||
revert(pos, returndatasize())
|
||||
}
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
let expr := /** @src 1:91:166 \"contract D is C(3)...\" */ _2
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
if _5
|
||||
{
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
let newFreePtr := add(_4, and(add(/** @src 0:410:418 \"this.f()\" */ returndatasize(), /** @src 1:91:166 \"contract D is C(3)...\" */ 31), not(31)))
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, _4))
|
||||
{
|
||||
mstore(_2, shl(224, 0x4e487b71))
|
||||
mstore(/** @src 0:410:418 \"this.f()\" */ 4, /** @src 1:91:166 \"contract D is C(3)...\" */ 0x41)
|
||||
revert(_2, 0x24)
|
||||
}
|
||||
mstore(64, newFreePtr)
|
||||
/// @src 0:410:418 \"this.f()\"
|
||||
expr := abi_decode_int256_fromMemory(_4, add(_4, returndatasize()))
|
||||
}
|
||||
/// @src 0:399:418 \"stateVar + this.f()\"
|
||||
let expr_1 := checked_add_int256(ret, expr)
|
||||
/// @src 0:343:344 \"_\"
|
||||
_1 := /** @src 0:399:429 \"stateVar + this.f() + immutVar\" */ checked_add_int256(expr_1, /** @src 0:421:429 \"immutVar\" */ loadimmutable(\"8\"))
|
||||
}
|
||||
/// @src 1:91:166 \"contract D is C(3)...\"
|
||||
function abi_decode_int256_fromMemory(headStart, dataEnd) -> value0
|
||||
{
|
||||
if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }
|
||||
|
@ -34,17 +34,7 @@ object \"C_7\" {
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
switch selector
|
||||
case 0x26121ff0 {
|
||||
if callvalue()
|
||||
{
|
||||
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
|
||||
}
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_6()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
case 0x26121ff0 { external_fun_f_6() }
|
||||
default { }
|
||||
}
|
||||
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
|
||||
@ -65,6 +55,18 @@ object \"C_7\" {
|
||||
}
|
||||
function abi_encode_tuple__to__fromStack(headStart) -> tail
|
||||
{ tail := add(headStart, 0) }
|
||||
function external_fun_f_6()
|
||||
{
|
||||
if callvalue()
|
||||
{
|
||||
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
|
||||
}
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_6()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
|
||||
{ revert(0, 0) }
|
||||
/// @ast-id 6 @src 0:92:119 \"function f() public pure {}\"
|
||||
|
@ -52,12 +52,7 @@ object \"C_7\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_6()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_6()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -94,6 +89,17 @@ object \"C_7\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_6() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_6()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -121,12 +121,7 @@ object \"D_16\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_15()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_15()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -163,6 +158,17 @@ object \"D_16\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_15() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_15()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -53,12 +53,7 @@ object "test_11" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bool__to_t_bool__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -105,6 +100,17 @@ object "test_11" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bool__to_t_bool__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -125,18 +125,7 @@ object "C_6" {
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_unsigned(calldataload(0))
|
||||
if eq(0x26121ff0, selector)
|
||||
{
|
||||
if callvalue()
|
||||
{
|
||||
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
|
||||
}
|
||||
abi_decode(4, calldatasize())
|
||||
fun_f()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple(memPos)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
if eq(0x26121ff0, selector) { external_fun_f() }
|
||||
}
|
||||
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
|
||||
}
|
||||
@ -421,6 +410,18 @@ object "C_6" {
|
||||
let tail_86 := tail_1
|
||||
tail := tail_1
|
||||
}
|
||||
function external_fun_f()
|
||||
{
|
||||
if callvalue()
|
||||
{
|
||||
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
|
||||
}
|
||||
abi_decode(4, calldatasize())
|
||||
fun_f()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple(memPos)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
|
||||
{ revert(0, 0) }
|
||||
/// @ast-id 5 @src 0:74:101 "function f() public pure {}"
|
||||
|
@ -52,12 +52,7 @@ object \"C_11\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -132,6 +127,17 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -52,12 +52,7 @@ object \"C_11\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -104,6 +99,17 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes32__to_t_bytes32__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -52,12 +52,7 @@ object \"C_11\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -104,6 +99,17 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -52,12 +52,7 @@ object \"C_11\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -132,6 +127,17 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_string_memory_ptr__to_t_string_memory_ptr__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -52,12 +52,7 @@ object \"C_11\" {
|
||||
{
|
||||
// f()
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
external_fun_f_10()
|
||||
}
|
||||
|
||||
default {}
|
||||
@ -104,6 +99,17 @@ object \"C_11\" {
|
||||
|
||||
}
|
||||
|
||||
function external_fun_f_10() {
|
||||
|
||||
if callvalue() { revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb() }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
let ret_0 := fun_f_10()
|
||||
let memPos := allocate_unbounded()
|
||||
let memEnd := abi_encode_tuple_t_bytes4__to_t_bytes4__fromStack(memPos , ret_0)
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
|
||||
}
|
||||
|
||||
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74() {
|
||||
revert(0, 0)
|
||||
}
|
||||
|
@ -60,10 +60,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 373483
|
||||
// gas irOptimized: 371847
|
||||
// gas legacy: 418955
|
||||
// gas legacyOptimized: 326783
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 524664
|
||||
// gas irOptimized: 522929
|
||||
// gas legacy: 586784
|
||||
// gas legacyOptimized: 451529
|
||||
|
@ -26,6 +26,6 @@ contract C {
|
||||
// ----
|
||||
// library: L
|
||||
// f() -> 8, 7, 1, 2, 7, 12
|
||||
// gas irOptimized: 167446
|
||||
// gas irOptimized: 167672
|
||||
// gas legacy: 169347
|
||||
// gas legacyOptimized: 167269
|
||||
|
@ -61,10 +61,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 373483
|
||||
// gas irOptimized: 371847
|
||||
// gas legacy: 418955
|
||||
// gas legacyOptimized: 326783
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 524664
|
||||
// gas irOptimized: 522929
|
||||
// gas legacy: 586784
|
||||
// gas legacyOptimized: 451529
|
||||
|
@ -53,6 +53,6 @@ contract C {
|
||||
// f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
|
||||
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
|
||||
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
|
||||
// gas irOptimized: 113361
|
||||
// gas irOptimized: 113299
|
||||
// gas legacy: 114900
|
||||
// gas legacyOptimized: 112606
|
||||
|
@ -32,6 +32,6 @@ contract C is B {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 77
|
||||
// gas irOptimized: 119931
|
||||
// gas irOptimized: 119895
|
||||
// gas legacy: 155093
|
||||
// gas legacyOptimized: 111550
|
||||
|
@ -21,6 +21,6 @@ contract C {
|
||||
// f(uint256[][1]): 32, 32, 0 -> true
|
||||
// f(uint256[][1]): 32, 32, 1, 42 -> true
|
||||
// f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true
|
||||
// gas irOptimized: 171964
|
||||
// gas irOptimized: 171838
|
||||
// gas legacy: 141644
|
||||
// gas legacyOptimized: 121532
|
||||
|
@ -19,10 +19,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
|
||||
// gas irOptimized: 180925
|
||||
// gas irOptimized: 180931
|
||||
// gas legacy: 184929
|
||||
// gas legacyOptimized: 181504
|
||||
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
|
||||
// gas irOptimized: 112535
|
||||
// gas irOptimized: 112539
|
||||
// gas legacy: 115468
|
||||
// gas legacyOptimized: 112988
|
||||
|
@ -14,7 +14,7 @@ contract Test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06
|
||||
// gas irOptimized: 189910
|
||||
// gas irOptimized: 189871
|
||||
// gas legacy: 211149
|
||||
// gas legacyOptimized: 206054
|
||||
// data(uint256,uint256): 0x02, 0x02 -> 0x09
|
||||
|
@ -15,7 +15,7 @@ contract c {
|
||||
// ----
|
||||
// getLength() -> 0
|
||||
// set(): 1, 2 -> true
|
||||
// gas irOptimized: 110433
|
||||
// gas irOptimized: 110439
|
||||
// gas legacy: 110726
|
||||
// gas legacyOptimized: 110567
|
||||
// getLength() -> 68
|
||||
|
@ -22,7 +22,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32
|
||||
// gas irOptimized: 650669
|
||||
// gas irOptimized: 650647
|
||||
// gas legacy: 694515
|
||||
// gas legacyOptimized: 694013
|
||||
// retrieve() -> 9, 28, 9, 28, 4, 3, 32
|
||||
|
@ -37,12 +37,12 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x02000202
|
||||
// gas irOptimized: 4652092
|
||||
// gas irOptimized: 4652058
|
||||
// gas legacy: 4578341
|
||||
// gas legacyOptimized: 4548354
|
||||
// storageEmpty -> 1
|
||||
// clear() -> 0, 0
|
||||
// gas irOptimized: 4483169
|
||||
// gas irOptimized: 4483175
|
||||
// gas legacy: 4410769
|
||||
// gas legacyOptimized: 4382531
|
||||
// storageEmpty -> 1
|
||||
|
@ -17,7 +17,7 @@ contract c {
|
||||
// ----
|
||||
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
|
||||
// copyStorageStorage() ->
|
||||
// gas irOptimized: 111426
|
||||
// gas irOptimized: 111406
|
||||
// gas legacy: 109278
|
||||
// gas legacyOptimized: 109268
|
||||
// getData2(uint256): 5 -> 10, 4
|
||||
|
@ -38,10 +38,10 @@ contract c {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 181308
|
||||
// gas irOptimized: 181298
|
||||
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 157901
|
||||
// gas irOptimized: 157936
|
||||
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 135108
|
||||
// gas irOptimized: 135098
|
||||
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
|
||||
// gas irOptimized: 111428
|
||||
// gas irOptimized: 111362
|
||||
|
@ -40,12 +40,12 @@ contract Test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 24
|
||||
// gas irOptimized: 227167
|
||||
// gas irOptimized: 227133
|
||||
// gas legacy: 227133
|
||||
// gas legacyOptimized: 226547
|
||||
// test1() -> 3
|
||||
// test2() -> 6
|
||||
// test3() -> 24
|
||||
// gas irOptimized: 133621
|
||||
// gas irOptimized: 133597
|
||||
// gas legacy: 134295
|
||||
// gas legacyOptimized: 133383
|
||||
|
@ -47,7 +47,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// copyExternalStorageArrayOfFunctionType() -> true
|
||||
// gas irOptimized: 104701
|
||||
// gas irOptimized: 104669
|
||||
// gas legacy: 108725
|
||||
// gas legacyOptimized: 102441
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -50,7 +50,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// copyExternalStorageArraysOfFunctionType() -> true
|
||||
// gas irOptimized: 104372
|
||||
// gas irOptimized: 104342
|
||||
// gas legacy: 108462
|
||||
// gas legacyOptimized: 102174
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -7,11 +7,11 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(uint256): 1, 2 -> true
|
||||
// gas irOptimized: 110699
|
||||
// gas irOptimized: 110604
|
||||
// gas legacy: 111091
|
||||
// gas legacyOptimized: 110736
|
||||
// set(uint256): 2, 2, 3, 4, 5 -> true
|
||||
// gas irOptimized: 177659
|
||||
// gas irOptimized: 177564
|
||||
// gas legacy: 178021
|
||||
// gas legacyOptimized: 177666
|
||||
// storageEmpty -> 0
|
||||
|
@ -37,11 +37,11 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 179952
|
||||
// gas irOptimized: 179899
|
||||
// gas legacy: 180694
|
||||
// gas legacyOptimized: 180088
|
||||
// g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000
|
||||
// gas irOptimized: 107332
|
||||
// gas irOptimized: 107274
|
||||
// gas legacy: 107895
|
||||
// gas legacyOptimized: 107254
|
||||
// h() -> 0x40, 0x60, 0x00, 0x00
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 7
|
||||
// gas irOptimized: 124080
|
||||
// gas irOptimized: 124041
|
||||
// gas legacy: 205196
|
||||
// gas legacyOptimized: 204987
|
||||
|
@ -9,7 +9,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(): 1, 2, 3, 4, 5 -> true
|
||||
// gas irOptimized: 177417
|
||||
// gas irOptimized: 177390
|
||||
// gas legacy: 177656
|
||||
// gas legacyOptimized: 177496
|
||||
// storageEmpty -> 0
|
||||
|
@ -21,7 +21,7 @@ contract sender {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// (): 7 ->
|
||||
// gas irOptimized: 110941
|
||||
// gas irOptimized: 110954
|
||||
// gas legacy: 111082
|
||||
// gas legacyOptimized: 111027
|
||||
// val() -> 0
|
||||
|
@ -16,7 +16,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 519848
|
||||
// gas irOptimized: 519886
|
||||
// gas legacy: 521773
|
||||
// gas legacyOptimized: 517048
|
||||
// storageEmpty -> 0
|
||||
|
@ -44,7 +44,7 @@ contract c {
|
||||
// ----
|
||||
// getLengths() -> 0, 0
|
||||
// setLengths(uint256,uint256): 48, 49 ->
|
||||
// gas irOptimized: 104355
|
||||
// gas irOptimized: 111304
|
||||
// gas legacy: 108571
|
||||
// gas legacyOptimized: 100417
|
||||
// getLengths() -> 48, 49
|
||||
|
@ -18,7 +18,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() -> 8
|
||||
// gas irOptimized: 122528
|
||||
// gas irOptimized: 122534
|
||||
// gas legacy: 121756
|
||||
// gas legacyOptimized: 120687
|
||||
// storageEmpty -> 0
|
||||
|
@ -13,7 +13,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 465585
|
||||
// gas irOptimized: 465544
|
||||
// gas legacy: 471460
|
||||
// gas legacyOptimized: 467520
|
||||
// storageEmpty -> 0
|
||||
|
@ -11,7 +11,7 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3, 4 ->
|
||||
// gas irOptimized: 132278
|
||||
// gas irOptimized: 129908
|
||||
// gas legacy: 176789
|
||||
// gas legacyOptimized: 129585
|
||||
// r() -> 4
|
||||
|
@ -45,6 +45,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 5, 6, 7
|
||||
// gas irOptimized: 290947
|
||||
// gas irOptimized: 290567
|
||||
// gas legacy: 452172
|
||||
// gas legacyOptimized: 285017
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5
|
||||
// gas irOptimized: 138785
|
||||
// gas irOptimized: 138732
|
||||
// gas legacy: 145150
|
||||
// gas legacyOptimized: 139171
|
||||
|
@ -29,14 +29,14 @@ contract C {
|
||||
// ----
|
||||
// l() -> 0
|
||||
// f(uint256,uint256): 42, 64 ->
|
||||
// gas irOptimized: 112555
|
||||
// gas irOptimized: 112528
|
||||
// gas legacy: 108234
|
||||
// gas legacyOptimized: 102245
|
||||
// l() -> 1
|
||||
// ll(uint256): 0 -> 43
|
||||
// a(uint256,uint256): 0, 42 -> 64
|
||||
// f(uint256,uint256): 84, 128 ->
|
||||
// gas irOptimized: 116427
|
||||
// gas irOptimized: 116400
|
||||
// gas legacy: 107780
|
||||
// gas legacyOptimized: 96331
|
||||
// l() -> 2
|
||||
|
@ -23,7 +23,7 @@ contract C {
|
||||
// ----
|
||||
// l() -> 0
|
||||
// g(uint256): 70 ->
|
||||
// gas irOptimized: 184507
|
||||
// gas irOptimized: 185936
|
||||
// gas legacy: 184991
|
||||
// gas legacyOptimized: 180608
|
||||
// l() -> 70
|
||||
|
@ -26,6 +26,6 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1
|
||||
// gas irOptimized: 113581
|
||||
// gas irOptimized: 113552
|
||||
// gas legacy: 126596
|
||||
// gas legacyOptimized: 113823
|
||||
|
@ -11,7 +11,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// (): 1, 2, 3, 4, 5 ->
|
||||
// gas irOptimized: 155178
|
||||
// gas irOptimized: 155181
|
||||
// gas legacy: 155254
|
||||
// gas legacyOptimized: 155217
|
||||
// checkIfDataIsEmpty() -> false
|
||||
|
@ -26,6 +26,6 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8
|
||||
// gas irOptimized: 456668
|
||||
// gas irOptimized: 443921
|
||||
// gas legacy: 590683
|
||||
// gas legacyOptimized: 448326
|
||||
|
@ -26,6 +26,6 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h"
|
||||
// gas irOptimized: 308497
|
||||
// gas irOptimized: 300765
|
||||
// gas legacy: 428917
|
||||
// gas legacyOptimized: 298128
|
||||
|
@ -19,7 +19,7 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): "abc", true
|
||||
// gas irOptimized: 112563
|
||||
// gas irOptimized: 107175
|
||||
// gas legacy: 145838
|
||||
// gas legacyOptimized: 104017
|
||||
// getFlag() -> true
|
||||
|
@ -12,7 +12,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3, 4 ->
|
||||
// gas irOptimized: 180731
|
||||
// gas irOptimized: 174905
|
||||
// gas legacy: 221377
|
||||
// gas legacyOptimized: 177671
|
||||
// a() -> 1
|
||||
|
@ -15,5 +15,5 @@ contract B is A {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 122233
|
||||
// gas irOptimized: 122017
|
||||
// y() -> 42
|
||||
|
@ -12,7 +12,7 @@ contract B is A {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 122233
|
||||
// gas irOptimized: 122017
|
||||
// gas legacy: 135046
|
||||
// gas legacyOptimized: 116176
|
||||
// y() -> 42
|
||||
|
@ -23,7 +23,7 @@ contract D is B, C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2, 0 ->
|
||||
// gas irOptimized: 159542
|
||||
// gas irOptimized: 160166
|
||||
// gas legacy: 170665
|
||||
// gas legacyOptimized: 145396
|
||||
// i() -> 2
|
||||
|
@ -76,7 +76,7 @@ contract FixedFeeRegistrar is Registrar {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 426283
|
||||
// gas irOptimized: 413485
|
||||
// gas legacy: 936897
|
||||
// gas legacyOptimized: 490983
|
||||
// reserve(string), 69 ether: 0x20, 3, "abc" ->
|
||||
|
@ -178,7 +178,7 @@ contract DepositContract is IDepositContract, ERC165 {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1557137
|
||||
// gas irOptimized: 1543359
|
||||
// gas legacy: 2436584
|
||||
// gas legacyOptimized: 1776483
|
||||
// supportsInterface(bytes4): 0x0 -> 0
|
||||
@ -186,27 +186,27 @@ contract DepositContract is IDepositContract, ERC165 {
|
||||
// supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id #
|
||||
// supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id #
|
||||
// get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e
|
||||
// gas irOptimized: 122169
|
||||
// gas irOptimized: 122135
|
||||
// gas legacy: 150465
|
||||
// gas legacyOptimized: 122798
|
||||
// get_deposit_count() -> 0x20, 8, 0 # TODO: check balance and logs after each deposit #
|
||||
// deposit(bytes,bytes,bytes,bytes32), 32 ether: 0 -> FAILURE # Empty input #
|
||||
// get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e
|
||||
// gas irOptimized: 122169
|
||||
// gas irOptimized: 122135
|
||||
// gas legacy: 150465
|
||||
// gas legacyOptimized: 122798
|
||||
// get_deposit_count() -> 0x20, 8, 0
|
||||
// deposit(bytes,bytes,bytes,bytes32), 1 ether: 0x80, 0xe0, 0x120, 0xaa4a8d0b7d9077248630f1a4701ae9764e42271d7f22b7838778411857fd349e, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0x00f50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8 -> # txhash: 0x7085c586686d666e8bb6e9477a0f0b09565b2060a11f1c4209d3a52295033832 #
|
||||
// ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0xf50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x08, 0xca9a3b00000000000000000000000000000000000000000000000000000000, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8, 0x08, 0x00
|
||||
// get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438
|
||||
// gas irOptimized: 122148
|
||||
// gas irOptimized: 122114
|
||||
// gas legacy: 150475
|
||||
// gas legacyOptimized: 122811
|
||||
// get_deposit_count() -> 0x20, 8, 0x0100000000000000000000000000000000000000000000000000000000000000
|
||||
// deposit(bytes,bytes,bytes,bytes32), 32 ether: 0x80, 0xe0, 0x120, 0xdbd986dc85ceb382708cf90a3500f500f0a393c5ece76963ac3ed72eccd2c301, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x00344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d -> # txhash: 0x404d8e109822ce448e68f45216c12cb051b784d068fbe98317ab8e50c58304ac #
|
||||
// ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x08, 0x40597307000000000000000000000000000000000000000000000000000000, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d, 0x08, 0x0100000000000000000000000000000000000000000000000000000000000000
|
||||
// get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee
|
||||
// gas irOptimized: 122148
|
||||
// gas irOptimized: 122114
|
||||
// gas legacy: 150475
|
||||
// gas legacyOptimized: 122811
|
||||
// get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -50,7 +50,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1924392
|
||||
// gas irOptimized: 1938339
|
||||
// gas legacy: 2480887
|
||||
// gas legacyOptimized: 1874490
|
||||
// div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
|
||||
|
@ -50,7 +50,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1778342
|
||||
// gas irOptimized: 1790188
|
||||
// gas legacy: 2250130
|
||||
// gas legacyOptimized: 1746528
|
||||
// div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
|
||||
|
@ -35,7 +35,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 465357
|
||||
// gas irOptimized: 465789
|
||||
// gas legacy: 672749
|
||||
// gas legacyOptimized: 479606
|
||||
// prb_pi() -> 3141592656369545286
|
||||
|
@ -51,7 +51,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 702619
|
||||
// gas irOptimized: 707330
|
||||
// gas legacy: 1130761
|
||||
// gas legacyOptimized: 750416
|
||||
// toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0
|
||||
@ -71,6 +71,6 @@ contract test {
|
||||
// gas legacy: 31621
|
||||
// gas legacyOptimized: 27914
|
||||
// benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020
|
||||
// gas irOptimized: 2040067
|
||||
// gas irOptimized: 2040045
|
||||
// gas legacy: 4381235
|
||||
// gas legacyOptimized: 2317529
|
||||
|
@ -27,7 +27,7 @@ contract C {
|
||||
// revertStrings: debug
|
||||
// ----
|
||||
// constructor(), 1 ether ->
|
||||
// gas irOptimized: 448383
|
||||
// gas irOptimized: 445767
|
||||
// gas legacy: 834272
|
||||
// gas legacyOptimized: 510004
|
||||
// f(uint256): 0 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code"
|
||||
|
@ -18,7 +18,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei
|
||||
// gas irOptimized: 218775
|
||||
// gas irOptimized: 213663
|
||||
// gas legacy: 294569
|
||||
// gas legacyOptimized: 174699
|
||||
// f(uint256): 20 -> 1370859564726510389319704988634906228201275401179
|
||||
@ -26,7 +26,7 @@ contract C {
|
||||
// f(uint256): 20 -> FAILURE
|
||||
// x() -> 1
|
||||
// stack(uint256): 1023 -> FAILURE
|
||||
// gas irOptimized: 296769
|
||||
// gas irOptimized: 304303
|
||||
// gas legacy: 483942
|
||||
// gas legacyOptimized: 298807
|
||||
// x() -> 1
|
||||
|
@ -41,7 +41,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei ->
|
||||
// gas irOptimized: 285350
|
||||
// gas irOptimized: 274154
|
||||
// gas legacy: 402654
|
||||
// gas legacyOptimized: 274470
|
||||
// sendAmount(uint256): 5 -> 5
|
||||
|
@ -40,7 +40,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei ->
|
||||
// gas irOptimized: 285350
|
||||
// gas irOptimized: 274154
|
||||
// gas legacy: 402654
|
||||
// gas legacyOptimized: 274470
|
||||
// sendAmount(uint256): 5 -> 5
|
||||
|
@ -20,7 +20,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0
|
||||
// gas irOptimized: 111896
|
||||
// gas irOptimized: 111929
|
||||
// gas legacy: 113806
|
||||
// gas legacyOptimized: 111781
|
||||
// get(uint8): 1 -> 21, 22, 42, 43
|
||||
|
@ -29,7 +29,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 3, 7, 5
|
||||
// gas irOptimized: 127387
|
||||
// gas irOptimized: 127302
|
||||
// gas legacy: 151334
|
||||
// gas legacyOptimized: 125166
|
||||
// x() -> 7
|
||||
|
@ -17,7 +17,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 3 ->
|
||||
// gas irOptimized: 137184
|
||||
// gas irOptimized: 131042
|
||||
// gas legacy: 209361
|
||||
// gas legacyOptimized: 139324
|
||||
// f() -> 84, 23
|
||||
|
@ -25,6 +25,6 @@ contract B {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// g() -> 42
|
||||
// gas irOptimized: 111781
|
||||
// gas irOptimized: 111770
|
||||
// gas legacy: 185053
|
||||
// gas legacyOptimized: 114598
|
||||
|
@ -42,7 +42,7 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 22 wei ->
|
||||
// gas irOptimized: 288778
|
||||
// gas irOptimized: 276469
|
||||
// gas legacy: 402045
|
||||
// gas legacyOptimized: 266772
|
||||
// getFlag() -> true
|
||||
|
@ -22,6 +22,6 @@ contract A {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(), 10 ether -> 3007, 3008, 3009
|
||||
// gas irOptimized: 272947
|
||||
// gas irOptimized: 272338
|
||||
// gas legacy: 422501
|
||||
// gas legacyOptimized: 287472
|
||||
|
@ -14,7 +14,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 2 wei: 3 ->
|
||||
// gas irOptimized: 111723
|
||||
// gas irOptimized: 111699
|
||||
// gas legacy: 151416
|
||||
// gas legacyOptimized: 108388
|
||||
// state() -> 3
|
||||
|
@ -14,7 +14,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 119839
|
||||
// gas irOptimized: 115297
|
||||
// gas legacy: 155081
|
||||
// gas legacyOptimized: 107997
|
||||
// genesisHash() -> 0x3737373737373737373737373737373737373737373737373737373737373737
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint32,(uint128,uint256[][2],uint32)): 55, 0x40, 77, 0x60, 88, 0x40, 0x40, 2, 1, 2 -> 55, 77, 1, 2, 88
|
||||
// gas irOptimized: 203397
|
||||
// gas irOptimized: 203312
|
||||
// gas legacy: 209194
|
||||
// gas legacyOptimized: 203583
|
||||
|
@ -25,6 +25,6 @@ contract CopyTest {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// run() -> 2, 23, 42
|
||||
// gas irOptimized: 193980
|
||||
// gas irOptimized: 194005
|
||||
// gas legacy: 186016
|
||||
// gas legacyOptimized: 184668
|
||||
|
@ -88,7 +88,7 @@ contract Test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test1() -> true
|
||||
// gas irOptimized: 150618
|
||||
// gas irOptimized: 150545
|
||||
// gas legacy: 150266
|
||||
// gas legacyOptimized: 149875
|
||||
// test2() -> true
|
||||
|
@ -69,7 +69,7 @@ contract Test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
|
||||
// gas irOptimized: 111179
|
||||
// gas irOptimized: 111432
|
||||
// gas legacy: 112999
|
||||
// gas legacyOptimized: 110881
|
||||
// store() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
|
||||
|
@ -25,7 +25,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// set(uint256,bytes,uint256): 12, 0x60, 13, 33, "12345678901234567890123456789012", "3" -> true
|
||||
// gas irOptimized: 133752
|
||||
// gas irOptimized: 133728
|
||||
// gas legacy: 134436
|
||||
// gas legacyOptimized: 133879
|
||||
// test(uint256): 32 -> "3"
|
||||
|
@ -38,12 +38,12 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(uint256): 7 -> true
|
||||
// gas irOptimized: 110119
|
||||
// gas irOptimized: 110051
|
||||
// gas legacy: 110616
|
||||
// gas legacyOptimized: 110006
|
||||
// retrieve(uint256): 7 -> 1, 3, 4, 2
|
||||
// copy(uint256,uint256): 7, 8 -> true
|
||||
// gas irOptimized: 118698
|
||||
// gas irOptimized: 118597
|
||||
// gas legacy: 119166
|
||||
// gas legacyOptimized: 118622
|
||||
// retrieve(uint256): 7 -> 1, 3, 4, 2
|
||||
|
@ -33,4 +33,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 0, 0, 0
|
||||
// gas irOptimized: 117289
|
||||
// gas irOptimized: 117403
|
||||
|
@ -44,7 +44,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() ->
|
||||
// gas irOptimized: 121618
|
||||
// gas irOptimized: 121624
|
||||
// gas legacy: 122132
|
||||
// gas legacyOptimized: 121500
|
||||
// g() ->
|
||||
|
@ -32,7 +32,7 @@ contract test {
|
||||
// ----
|
||||
// check() -> false
|
||||
// set() ->
|
||||
// gas irOptimized: 134335
|
||||
// gas irOptimized: 134432
|
||||
// gas legacy: 135277
|
||||
// gas legacyOptimized: 134064
|
||||
// check() -> true
|
||||
|
@ -51,7 +51,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_f() -> true
|
||||
// gas irOptimized: 122509
|
||||
// gas irOptimized: 122413
|
||||
// gas legacy: 126168
|
||||
// gas legacyOptimized: 123199
|
||||
// test_g() -> true
|
||||
|
@ -115,7 +115,7 @@ contract ERC20 {
|
||||
// ----
|
||||
// constructor()
|
||||
// ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14
|
||||
// gas irOptimized: 447831
|
||||
// gas irOptimized: 423885
|
||||
// gas legacy: 861559
|
||||
// gas legacyOptimized: 420959
|
||||
// totalSupply() -> 20
|
||||
|
@ -17,7 +17,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 199687
|
||||
// gas irOptimized: 199723
|
||||
// gas legacy: 241124
|
||||
// gas legacyOptimized: 155549
|
||||
// initCode() -> 0x20, 0
|
||||
|
@ -36,6 +36,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 0x5, "abcde" -> 0
|
||||
// gas irOptimized: 240685
|
||||
// gas irOptimized: 240691
|
||||
// gas legacy: 240358
|
||||
// gas legacyOptimized: 239682
|
||||
|
@ -98,7 +98,7 @@ contract ERC20 {
|
||||
// ----
|
||||
// constructor()
|
||||
// ~ emit Transfer(address,address,uint256): #0x00, #0x1212121212121212121212121212120000000012, 0x14
|
||||
// gas irOptimized: 443295
|
||||
// gas irOptimized: 419330
|
||||
// gas legacy: 833310
|
||||
// gas legacyOptimized: 416135
|
||||
// totalSupply() -> 20
|
||||
|
@ -22,6 +22,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// g() -> 2, 6
|
||||
// gas irOptimized: 178835
|
||||
// gas irOptimized: 178822
|
||||
// gas legacy: 180762
|
||||
// gas legacyOptimized: 179481
|
||||
|
@ -42,6 +42,6 @@ contract D {
|
||||
// gas legacy: 98438801
|
||||
// gas legacyOptimized: 98438594
|
||||
// fpure() -> FAILURE
|
||||
// gas irOptimized: 98438626
|
||||
// gas irOptimized: 98438625
|
||||
// gas legacy: 98438801
|
||||
// gas legacyOptimized: 98438595
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user