Merge pull request #14149 from ethereum/enable-minimal-yul-optimizations-by-default

Minimal Yul optimizations by default
This commit is contained in:
Kamil Śliwak 2023-06-07 18:26:00 +02:00 committed by GitHub
commit facc38097d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
83 changed files with 1207 additions and 982 deletions

View File

@ -11,6 +11,7 @@ Compiler Features:
* Parser: Introduce ``pragma experimental solidity``, which will enable an experimental language mode that in particular has no stability guarantees between non-breaking releases and is not suited for production use.
* Standard JSON Interface: Add ``ast`` file-level output for Yul input.
* Standard JSON Interface: Add ``irAst`` and ``irOptimizedAst`` contract-level outputs for Solidity input, providing AST in compact JSON format for IR and optimized IR.
* Yul Optimizer: Stack-to-memory mover is now enabled by default whenever possible for via IR code generation and pure Yul compilation.
Bugfixes:

View File

@ -304,7 +304,7 @@ Input Description
// optimization-sequence:clean-up-sequence. For more information see
// "The Optimizer > Selecting Optimizations".
// This field is optional, and if not provided, the default sequences for both
// optimization and clean-up are used. If only one of the options is provivded
// optimization and clean-up are used. If only one of the sequences is provided
// the other will not be run.
// If only the delimiter ":" is provided then neither the optimization nor the clean-up
// sequence will be run.

View File

@ -103,8 +103,8 @@ struct OptimiserSettings
case OptimisationPreset::Minimal: return minimal();
case OptimisationPreset::Standard: return standard();
case OptimisationPreset::Full: return full();
default: solAssert(false, "");
}
util::unreachable();
}
bool operator==(OptimiserSettings const& _other) const

View File

@ -30,6 +30,7 @@
#include <libyul/backends/evm/EVMObjectCompiler.h>
#include <libyul/backends/evm/EVMMetrics.h>
#include <libyul/ObjectParser.h>
#include <libyul/optimiser/Semantics.h>
#include <libyul/optimiser/Suite.h>
#include <libevmasm/Assembly.h>
#include <liblangutil/Scanner.h>
@ -86,10 +87,14 @@ bool YulStack::parseAndAnalyze(std::string const& _sourceName, std::string const
void YulStack::optimize()
{
if (!m_optimiserSettings.runYulOptimiser)
return;
yulAssert(m_analysisSuccessful, "Analysis was not successful.");
yulAssert(m_parserResult);
if (
!m_optimiserSettings.runYulOptimiser &&
yul::MSizeFinder::containsMSize(languageToDialect(m_language, m_evmVersion), *m_parserResult)
)
return;
m_analysisSuccessful = false;
yulAssert(m_parserResult, "");
@ -159,13 +164,15 @@ void YulStack::optimize(Object& _object, bool _isCreation)
unique_ptr<GasMeter> meter;
if (EVMDialect const* evmDialect = dynamic_cast<EVMDialect const*>(&dialect))
meter = make_unique<GasMeter>(*evmDialect, _isCreation, m_optimiserSettings.expectedExecutionsPerDeployment);
OptimiserSuite::run(
dialect,
meter.get(),
_object,
m_optimiserSettings.optimizeStackAllocation,
m_optimiserSettings.yulOptimiserSteps,
m_optimiserSettings.yulOptimiserCleanupSteps,
// Defaults are the minimum necessary to avoid running into "Stack too deep" constantly.
m_optimiserSettings.runYulOptimiser ? m_optimiserSettings.optimizeStackAllocation : true,
m_optimiserSettings.runYulOptimiser ? m_optimiserSettings.yulOptimiserSteps : "u",
m_optimiserSettings.runYulOptimiser ? m_optimiserSettings.yulOptimiserCleanupSteps : "",
_isCreation ? nullopt : make_optional(m_optimiserSettings.expectedExecutionsPerDeployment),
{}
);
@ -231,7 +238,15 @@ YulStack::assembleEVMWithDeployed(optional<string_view> _deployName) const
evmasm::Assembly assembly(m_evmVersion, true, {});
EthAssemblyAdapter adapter(assembly);
compileEVM(adapter, m_optimiserSettings.optimizeStackAllocation);
// NOTE: We always need stack optimization when Yul optimizer is disabled (unless code contains
// msize). It being disabled just means that we don't use the full step sequence. We still run
// it with the minimal steps required to avoid "stack too deep".
bool optimize = m_optimiserSettings.optimizeStackAllocation || (
!m_optimiserSettings.runYulOptimiser &&
!yul::MSizeFinder::containsMSize(languageToDialect(m_language, m_evmVersion), *m_parserResult)
);
compileEVM(adapter, optimize);
assembly.optimise(evmasm::Assembly::OptimiserSettings::translateSettings(m_optimiserSettings, m_evmVersion));

View File

@ -94,6 +94,19 @@ bool MSizeFinder::containsMSize(Dialect const& _dialect, Block const& _ast)
return finder.m_msizeFound;
}
bool MSizeFinder::containsMSize(Dialect const& _dialect, Object const& _object)
{
if (containsMSize(_dialect, *_object.code))
return true;
for (shared_ptr<ObjectNode> const& node: _object.subObjects)
if (auto const* object = dynamic_cast<Object const*>(node.get()))
if (containsMSize(_dialect, *object))
return true;
return false;
}
void MSizeFinder::operator()(FunctionCall const& _functionCall)
{
ASTWalker::operator()(_functionCall);

View File

@ -21,10 +21,11 @@
#pragma once
#include <libyul/optimiser/ASTWalker.h>
#include <libyul/SideEffects.h>
#include <libyul/optimiser/CallGraphGenerator.h>
#include <libyul/AST.h>
#include <libyul/Object.h>
#include <libyul/SideEffects.h>
#include <libyul/optimiser/ASTWalker.h>
#include <libyul/optimiser/CallGraphGenerator.h>
#include <set>
@ -143,6 +144,7 @@ class MSizeFinder: public ASTWalker
{
public:
static bool containsMSize(Dialect const& _dialect, Block const& _ast);
static bool containsMSize(Dialect const& _dialect, Object const& _object);
using ASTWalker::operator();
void operator()(FunctionCall const& _funCall) override;

View File

@ -5,171 +5,201 @@
{
"function-debug-runtime":
{
"abi_decode_tuple_":
"abi_decode":
{
"entryPoint": 117,
"entryPoint": 80,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_t_uint256_to_t_uint256_fromStack":
"abi_encode_uint256":
{
"entryPoint": 149,
"parameterSlots": 2,
"returnSlots": 0
},
"abi_encode_tuple_t_uint256__to_t_uint256__fromStack":
{
"entryPoint": 164,
"entryPoint": 111,
"parameterSlots": 2,
"returnSlots": 1
},
"abi_encode_uint256_to_uint256":
{
"entryPoint": 98,
"parameterSlots": 2,
"returnSlots": 0
},
"allocate_unbounded":
{
"entryPoint": 100,
"entryPoint": 66,
"parameterSlots": 0,
"returnSlots": 1
},
"cleanup_t_uint256":
"cleanup_uint256":
{
"entryPoint": 140,
"entryPoint": 95,
"parameterSlots": 1,
"returnSlots": 1
},
"convert_t_uint256_to_t_uint256":
"convert_uint256_to_uint256":
{
"entryPoint": 398,
"entryPoint": 276,
"parameterSlots": 1,
"returnSlots": 1
},
"external_fun_f_25":
"external_fun_f":
{
"entryPoint": 189,
"entryPoint": 132,
"parameterSlots": 0,
"returnSlots": 0
},
"external_fun_g_36":
"external_fun_g":
{
"entryPoint": 247,
"entryPoint": 185,
"parameterSlots": 0,
"returnSlots": 0
},
"fun_f_25":
"fun_f":
{
"entryPoint": 653,
"entryPoint": 442,
"id": 25,
"parameterSlots": 0,
"returnSlots": 1
},
"fun_f_25_inner":
"fun_f_inner":
{
"entryPoint": 621,
"entryPoint": 430,
"parameterSlots": 1,
"returnSlots": 1
},
"fun_g_36":
"fun_g":
{
"entryPoint": 858,
"entryPoint": 564,
"id": 36,
"parameterSlots": 0,
"returnSlots": 1
},
"fun_g_36_inner":
"fun_g_inner":
{
"entryPoint": 826,
"entryPoint": 552,
"parameterSlots": 1,
"returnSlots": 1
},
"identity":
{
"entryPoint": 389,
"entryPoint": 273,
"parameterSlots": 1,
"returnSlots": 1
},
"modifier_m":
{
"entryPoint": 509,
"id": 14,
"parameterSlots": 1,
"returnSlots": 1
},
"modifier_m_17":
{
"entryPoint": 475,
"entryPoint": 344,
"id": 14,
"parameterSlots": 1,
"returnSlots": 1
},
"modifier_m_19":
{
"entryPoint": 548,
"entryPoint": 387,
"id": 14,
"parameterSlots": 1,
"returnSlots": 1
},
"modifier_m_28":
{
"entryPoint": 680,
"entryPoint": 466,
"id": 14,
"parameterSlots": 1,
"returnSlots": 1
},
"modifier_m_30":
"prepare_store_uint256":
{
"entryPoint": 753,
"id": 14,
"parameterSlots": 1,
"returnSlots": 1
},
"prepare_store_t_uint256":
{
"entryPoint": 431,
"entryPoint": 304,
"parameterSlots": 1,
"returnSlots": 1
},
"revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74":
{
"entryPoint": 305,
"entryPoint": 238,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb":
{
"entryPoint": 109,
"entryPoint": 72,
"parameterSlots": 0,
"returnSlots": 0
},
"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b":
{
"entryPoint": 113,
"entryPoint": 76,
"parameterSlots": 0,
"returnSlots": 0
},
"shift_left_0":
"shift_left":
{
"entryPoint": 313,
"entryPoint": 246,
"parameterSlots": 1,
"returnSlots": 1
},
"shift_right_224_unsigned":
"shift_right_unsigned":
{
"entryPoint": 88,
"entryPoint": 60,
"parameterSlots": 1,
"returnSlots": 1
},
"update_byte_slice_32_shift_0":
"update_byte_slice_shift":
{
"entryPoint": 324,
"entryPoint": 251,
"parameterSlots": 2,
"returnSlots": 1
},
"update_storage_value_offset_0t_uint256_to_t_uint256":
"update_storage_value_offsett_uint256_to_uint256":
{
"entryPoint": 440,
"entryPoint": 307,
"parameterSlots": 2,
"returnSlots": 0
},
"usr$f":
{
"entryPoint": 496,
"entryPoint": 339,
"parameterSlots": 0,
"returnSlots": 1
},
"zero_value_for_split_t_uint256":
"usr$f_17":
{
"entryPoint": 309,
"entryPoint": 382,
"parameterSlots": 0,
"returnSlots": 1
},
"usr$f_22":
{
"entryPoint": 425,
"parameterSlots": 0,
"returnSlots": 1
},
"usr$f_26":
{
"entryPoint": 461,
"parameterSlots": 0,
"returnSlots": 1
},
"usr$f_32":
{
"entryPoint": 504,
"parameterSlots": 0,
"returnSlots": 1
},
"usr$f_37":
{
"entryPoint": 547,
"parameterSlots": 0,
"returnSlots": 1
},
"zero_value_for_split_uint256":
{
"entryPoint": 242,
"parameterSlots": 0,
"returnSlots": 1
}

View File

@ -4,23 +4,23 @@
Pretty printed source:
object "a" {
code {
let addr := linkersymbol("contract/test.sol:L")
sstore(0, addr)
{
let addr := linkersymbol("contract/test.sol:L")
sstore(0, addr)
}
}
}
Binary representation:
731234567890123456789012345678901234567890805f5550
7312345678901234567890123456789012345678905f5500
Text representation:
/* "linking_strict_assembly/input.yul":44:79 */
linkerSymbol("f919ba91ac99f96129544b80b9516b27a80e376b9dc693819d0b18b7e0395612")
/* "linking_strict_assembly/input.yul":98:102 */
dup1
/* "linking_strict_assembly/input.yul":95:96 */
0x00
/* "linking_strict_assembly/input.yul":88:103 */
sstore
/* "linking_strict_assembly/input.yul":22:109 */
pop
stop

View File

@ -4,18 +4,19 @@
Pretty printed source:
object "a" {
code {
let addr := linkersymbol(":L")
sstore(0, addr)
{
let addr := linkersymbol(":L")
sstore(0, addr)
}
}
}
Binary representation:
731234567890123456789012345678901234567890805f5550
7312345678901234567890123456789012345678905f5500
Text representation:
linkerSymbol("20a18a9bf97d889dcf77111b674da319a4e9e3e05d3f4df9e0bf5c588dd4f0f8")
dup1
0x00
sstore
pop
stop

View File

@ -4,18 +4,19 @@
Pretty printed source:
object "a" {
code {
let addr := linkersymbol("L")
sstore(0, addr)
{
let addr := linkersymbol("L")
sstore(0, addr)
}
}
}
Binary representation:
73__$8aa64f937099b65a4febc243a5ae0f2d64$__805f5550
73__$8aa64f937099b65a4febc243a5ae0f2d64$__5f5500
Text representation:
linkerSymbol("8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8")
dup1
0x00
sstore
pop
stop

View File

@ -4,34 +4,33 @@
Pretty printed source:
object "a" {
code {
let addr1 := linkersymbol("library1.sol:L")
let addr2 := linkersymbol("library2.sol:L")
sstore(0, addr1)
sstore(1, addr2)
{
let addr1 := linkersymbol("library1.sol:L")
let addr2 := linkersymbol("library2.sol:L")
sstore(0, addr1)
sstore(1, addr2)
}
}
}
Binary representation:
731111111111111111111111111111111111111111732222222222222222222222222222222222222222815f55806001555050
731111111111111111111111111111111111111111732222222222222222222222222222222222222222905f5560015500
Text representation:
/* "linking_strict_assembly_same_library_name_different_files/input.yul":45:75 */
linkerSymbol("f3ffc10c396a7cc41ae954b050792839d20947bf73497d30c49a9fda1ea477ec")
/* "linking_strict_assembly_same_library_name_different_files/input.yul":97:127 */
linkerSymbol("c3523432985587641d17c68161d2f700c57aaf4ed21cda4f25d76193c831f97f")
/* "linking_strict_assembly_same_library_name_different_files/input.yul":146:151 */
dup2
/* "linking_strict_assembly_same_library_name_different_files/input.yul":136:152 */
swap1
/* "linking_strict_assembly_same_library_name_different_files/input.yul":143:144 */
0x00
/* "linking_strict_assembly_same_library_name_different_files/input.yul":136:152 */
sstore
/* "linking_strict_assembly_same_library_name_different_files/input.yul":171:176 */
dup1
/* "linking_strict_assembly_same_library_name_different_files/input.yul":168:169 */
0x01
/* "linking_strict_assembly_same_library_name_different_files/input.yul":161:177 */
sstore
/* "linking_strict_assembly_same_library_name_different_files/input.yul":22:183 */
pop
pop
stop

View File

@ -4,34 +4,33 @@
Pretty printed source:
object "a" {
code {
let addr1 := linkersymbol("library1.sol:L")
let addr2 := linkersymbol("library2.sol:L")
sstore(0, addr1)
sstore(1, addr2)
{
let addr1 := linkersymbol("library1.sol:L")
let addr2 := linkersymbol("library2.sol:L")
sstore(0, addr1)
sstore(1, addr2)
}
}
}
Binary representation:
73123456789012345678901234567890123456789073__$c3523432985587641d17c68161d2f700c5$__815f55806001555050
73123456789012345678901234567890123456789073__$c3523432985587641d17c68161d2f700c5$__905f5560015500
Text representation:
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":45:75 */
linkerSymbol("f3ffc10c396a7cc41ae954b050792839d20947bf73497d30c49a9fda1ea477ec")
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":97:127 */
linkerSymbol("c3523432985587641d17c68161d2f700c57aaf4ed21cda4f25d76193c831f97f")
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":146:151 */
dup2
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":136:152 */
swap1
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":143:144 */
0x00
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":136:152 */
sstore
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":171:176 */
dup1
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":168:169 */
0x01
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":161:177 */
sstore
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":22:183 */
pop
pop
stop

View File

@ -4,18 +4,19 @@
Pretty printed source:
object "a" {
code {
let addr := linkersymbol(":L")
sstore(0, addr)
{
let addr := linkersymbol(":L")
sstore(0, addr)
}
}
}
Binary representation:
73__$20a18a9bf97d889dcf77111b674da319a4$__805f5550
73__$20a18a9bf97d889dcf77111b674da319a4$__5f5500
Text representation:
linkerSymbol("20a18a9bf97d889dcf77111b674da319a4e9e3e05d3f4df9e0bf5c588dd4f0f8")
dup1
0x00
sstore
pop
stop

View File

@ -4,18 +4,19 @@
Pretty printed source:
object "a" {
code {
let addr := linkersymbol("L")
sstore(0, addr)
{
let addr := linkersymbol("L")
sstore(0, addr)
}
}
}
Binary representation:
731234567890123456789012345678901234567890805f5550
7312345678901234567890123456789012345678905f5500
Text representation:
linkerSymbol("8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8")
dup1
0x00
sstore
pop
stop

View File

@ -4,34 +4,33 @@
Pretty printed source:
object "a" {
code {
let addr1 := linkersymbol("contract/test.sol:L1")
let addr2 := linkersymbol("contract/test.sol:L2")
sstore(0, addr1)
sstore(1, addr2)
{
let addr1 := linkersymbol("contract/test.sol:L1")
let addr2 := linkersymbol("contract/test.sol:L2")
sstore(0, addr1)
sstore(1, addr2)
}
}
}
Binary representation:
73123456789012345678901234567890123456789073__$fb58009a6b1ecea3b9d99bedd645df4ec3$__815f55806001555050
73123456789012345678901234567890123456789073__$fb58009a6b1ecea3b9d99bedd645df4ec3$__905f5560015500
Text representation:
/* "linking_strict_assembly_unresolved_references/input.yul":45:81 */
linkerSymbol("05b0326038374a21e0895480a58bda0768cdcc04c8d18f154362d1ca5223d245")
/* "linking_strict_assembly_unresolved_references/input.yul":103:139 */
linkerSymbol("fb58009a6b1ecea3b9d99bedd645df4ec308f17bc0087e5f39d078f77f809177")
/* "linking_strict_assembly_unresolved_references/input.yul":158:163 */
dup2
/* "linking_strict_assembly_unresolved_references/input.yul":148:164 */
swap1
/* "linking_strict_assembly_unresolved_references/input.yul":155:156 */
0x00
/* "linking_strict_assembly_unresolved_references/input.yul":148:164 */
sstore
/* "linking_strict_assembly_unresolved_references/input.yul":183:188 */
dup1
/* "linking_strict_assembly_unresolved_references/input.yul":180:181 */
0x01
/* "linking_strict_assembly_unresolved_references/input.yul":173:189 */
sstore
/* "linking_strict_assembly_unresolved_references/input.yul":22:195 */
pop
pop
stop

View File

@ -17,278 +17,267 @@
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
"nativeSrc": "44:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0x80"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"body":
{
"expression":
{
"arguments": [],
"functionName":
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "241:15:0",
"nodeType": "YulIdentifier",
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
@ -403,19 +392,6 @@
"nativeSrc": "522:125:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "726:59:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "699:86:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
@ -436,217 +412,83 @@
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
"nativeSrc": "899:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0x80"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1147:77:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1165:44:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1198:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1203:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1194:3:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1194:15:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1165:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1094:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1128:5:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1138:8:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1278:51:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1296:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1312:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1306:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1306:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1296:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1238:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1271:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
]
},
{
"body":

View File

@ -8,37 +8,38 @@
"irOptimized": "/// @use-src 0:\"A\"
object \"C_7\" {
code {
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
mstore(64, memoryguard(128))
if callvalue()
{
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
mstore(64, memoryguard(0x80))
if callvalue()
{
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
}
let _1 := allocate_unbounded()
codecopy(_1, dataoffset(\"C_7_deployed\"), datasize(\"C_7_deployed\"))
return(_1, datasize(\"C_7_deployed\"))
}
constructor_C_7()
let _1 := allocate_unbounded()
codecopy(_1, dataoffset(\"C_7_deployed\"), datasize(\"C_7_deployed\"))
return(_1, datasize(\"C_7_deployed\"))
function allocate_unbounded() -> memPtr
{ memPtr := mload(64) }
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
{ revert(0, 0) }
function constructor_C_7()
{ }
}
/// @use-src 0:\"A\"
object \"C_7_deployed\" {
code {
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
switch selector
case 0x26121ff0 { external_fun_f_6() }
default { }
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
mstore(64, memoryguard(0x80))
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_unsigned(calldataload(0))
switch selector
case 0x26121ff0 { external_fun_f() }
default { }
}
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
}
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
function shift_right_224_unsigned(value) -> newValue
function shift_right_unsigned(value) -> newValue
{ newValue := shr(224, value) }
function allocate_unbounded() -> memPtr
{ memPtr := mload(64) }
@ -46,32 +47,28 @@ object \"C_7\" {
{ revert(0, 0) }
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b()
{ revert(0, 0) }
function abi_decode_tuple_(headStart, dataEnd)
function abi_decode(headStart, dataEnd)
{
if slt(sub(dataEnd, headStart), 0)
{
revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b()
}
}
function abi_encode_tuple__to__fromStack(headStart) -> tail
function abi_encode_tuple(headStart) -> tail
{ tail := add(headStart, 0) }
function external_fun_f_6()
function external_fun_f()
{
if callvalue()
{
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
}
abi_decode_tuple_(4, calldatasize())
fun_f_6()
abi_decode(4, calldatasize())
let memPos := allocate_unbounded()
let memEnd := abi_encode_tuple__to__fromStack(memPos)
let memEnd := abi_encode_tuple(memPos)
return(memPos, sub(memEnd, memPos))
}
function revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
{ revert(0, 0) }
/// @ast-id 6 @src 0:92:119 \"function f() public pure {}\"
function fun_f_6()
{ }
}
data \".metadata\" hex\"<BYTECODE REMOVED>\"
}

View File

@ -7,22 +7,18 @@
{
"evm":
{
"assembly": " /* \"A\":17:18 */
"assembly": " /* \"A\":38:39 */
0x00
/* \"A\":11:19 */
mload
/* \"A\":38:39 */
0x00
/* \"A\":34:35 */
dup1
/* \"A\":31:32 */
dup3
dup1
mload
/* \"A\":27:36 */
add
/* \"A\":20:40 */
sstore
/* \"A\":0:42 */
pop
stop
",
"bytecode":
{
@ -43,8 +39,10 @@
",
"irOptimized": "object \"object\" {
code {
let x := mload(0)
sstore(add(x, 0), 0)
{
let x := mload(0)
sstore(add(x, 0), 0)
}
}
}
"

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -13,11 +13,11 @@
tag_1
jump\t// in
tag_2:
stop
/* \"input.sol\":77:99 */
jump(tag_3)
tag_1:
sstore(0x00, 0x2a)
jump\t// out
tag_3:
"
}
}

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -13,11 +13,11 @@
tag_1
jump\t// in
tag_2:
stop
/* \"input.sol\":77:99 */
jump(tag_3)
tag_1:
sstore(0x00, 0x2a)
jump\t// out
tag_3:
"
}
}

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -12,10 +12,10 @@
tag_1
jump\t// in
tag_2:
jump(tag_3)
stop
tag_1:
sstore(0x00, 0x2a)
jump\t// out
tag_3:
"
}
}

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -7,20 +7,17 @@
{
"evm":
{
"assembly": " /* \"A\":39:61 */
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
/* \"A\":80:81 */
"assembly": " /* \"A\":80:81 */
0x00
/* \"A\":76:77 */
/* \"A\":39:61 */
dup1
/* \"A\":73:74 */
dup3
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
/* \"A\":69:78 */
add
/* \"A\":62:82 */
sstore
/* \"A\":28:84 */
pop
stop
stop
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
",
@ -44,8 +41,10 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
",
"irOptimized": "object \"NamedObject\" {
code {
let x := dataoffset(\"DataName\")
sstore(add(x, 0), 0)
{
let x := dataoffset(\"DataName\")
sstore(add(x, 0), 0)
}
}
data \"DataName\" hex\"616263\"
}

View File

@ -7,29 +7,25 @@
{
"evm":
{
"assembly": " /* \"A\":39:61 */
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
/* \"A\":80:81 */
"assembly": " /* \"A\":80:81 */
0x00
/* \"A\":76:77 */
/* \"A\":39:61 */
dup1
/* \"A\":73:74 */
dup3
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
/* \"A\":69:78 */
add
/* \"A\":62:82 */
sstore
/* \"A\":28:84 */
pop
stop
stop
data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
sub_0: assembly {
/* \"A\":147:148 */
0x00
/* \"A\":144:145 */
dup1
/* \"A\":137:149 */
dup1
revert
}
",
@ -66,12 +62,14 @@ sub_0: assembly {
",
"irOptimized": "object \"NamedObject\" {
code {
let x := dataoffset(\"DataName\")
sstore(add(x, 0), 0)
{
let x := dataoffset(\"DataName\")
sstore(add(x, 0), 0)
}
}
data \"DataName\" hex\"616263\"
object \"OtherObject\" {
code { revert(0, 0) }
code { { revert(0, 0) } }
}
}
"

View File

@ -13,73 +13,49 @@ AST:
"statements":
[
{
"expression":
{
"arguments":
[
"nativeSrc": "60:246:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"kind": "number",
"nativeSrc": "122:2:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "64"
"arguments":
[
{
"kind": "number",
"nativeSrc": "122:2:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "64"
},
{
"kind": "number",
"nativeSrc": "126:3:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "115:6:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
{
"kind": "number",
"nativeSrc": "126:3:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "115:6:0",
"nodeType": "YulIdentifier",
"nativeSrc": "115:15:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "fun_f_5",
"nativeSrc": "155:7:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"body":
{
"nativeSrc": "244:11:0",
"nodeType": "YulBlock",
"src": "77:22:0",
"statements": []
},
"name": "fun_f_5",
"nativeSrc": "225:30:0",
"nodeType": "YulFunctionDefinition",
"src": "77:22:0"
}
]
}
]
},

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -5,18 +5,20 @@ Pretty printed source:
/// @use-src 0:"input.sol"
object "C_6_deployed" {
code {
/// @src 0:60:101
mstore(64, 128)
fun_f_5()
{
/// @src 0:60:101
mstore(64, 128)
fun_f()
}
/// @src 0:77:99
function fun_f_5()
{ }
function fun_f()
{ sstore(0, 42) }
}
}
Binary representation:
6080604052600a600e565b6010565b565b
6080604052600a600c565b005b602a5f5556
Text representation:
/* "input.sol":60:101 */
@ -25,8 +27,8 @@ Text representation:
tag_1
jump // in
tag_2:
stop
/* "input.sol":77:99 */
jump(tag_3)
tag_1:
sstore(0x00, 0x2a)
jump // out
tag_3:

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -5,18 +5,20 @@ Pretty printed source:
/// @use-src 0:"input.sol"
object "C_6_deployed" {
code {
/// @src 0:60:101
mstore(64, 128)
fun_f_5()
{
/// @src 0:60:101
mstore(64, 128)
fun_f()
}
/// @src 0:77:99
function fun_f_5()
{ }
function fun_f()
{ sstore(0, 42) }
}
}
Binary representation:
6080604052600a600e565b6010565b565b
6080604052600a600c565b005b602a5f5556
Text representation:
/* "input.sol":60:101 */
@ -25,8 +27,8 @@ Text representation:
tag_1
jump // in
tag_2:
stop
/* "input.sol":77:99 */
jump(tag_3)
tag_1:
sstore(0x00, 0x2a)
jump // out
tag_3:

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -5,16 +5,18 @@ Pretty printed source:
/// @use-src 0:"input.sol"
object "C_6_deployed" {
code {
mstore(64, 128)
fun_f_5()
function fun_f_5()
{ }
{
mstore(64, 128)
fun_f()
}
function fun_f()
{ sstore(0, 42) }
}
}
Binary representation:
6080604052600a600e565b6010565b565b
6080604052600a600c565b005b602a5f5556
Text representation:
mstore(0x40, 0x80)
@ -22,7 +24,7 @@ Text representation:
tag_1
jump // in
tag_2:
jump(tag_3)
stop
tag_1:
sstore(0x00, 0x2a)
jump // out
tag_3:

View File

@ -9,6 +9,7 @@ object "C_6_deployed" {
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
sstore(0, 42)
}
/// @src 0:60:101 "contract C {..."
}

View File

@ -0,0 +1 @@
--strict-assembly --debug-info none --optimize

View File

@ -0,0 +1,13 @@
{
function f() -> x {
x := mload(0)
}
// In pure Yul optimization in presence of msize is allowed.
// Everything in this file should get optimized out.
pop(msize())
let x := 0
let y := x
mstore(0, f())
}

View File

@ -0,0 +1,14 @@
======= strict_asm_msize_with_optimizer/input.yul (EVM) =======
Pretty printed source:
object "object" {
code { { } }
}
Binary representation:
00
Text representation:
stop

View File

@ -0,0 +1 @@
--strict-assembly --debug-info none

View File

@ -0,0 +1,13 @@
{
function f() -> x {
x := mload(0)
}
// In pure Yul without optimizer presence of msize disables stack optimization.
// This file should remain untouched when passed through the optimizer.
pop(msize())
let x := 0
let y := x
mstore(0, f())
}

View File

@ -0,0 +1,40 @@
======= strict_asm_msize_without_optimizer/input.yul (EVM) =======
Pretty printed source:
object "object" {
code {
function f() -> x
{ x := mload(0) }
pop(msize())
let x := 0
let y := x
mstore(0, f())
}
}
Binary representation:
600b565b5f8051905090565b5f8060136003565b5f525050
Text representation:
jump(tag_2)
tag_1:
0x00
dup1
mload
swap1
pop
swap1
jump // out
tag_2:
0x00
dup1
tag_4
tag_1
jump // in
tag_4:
0x00
mstore
pop
pop

View File

@ -0,0 +1 @@
--via-ir --ir-optimized --asm --debug-info none

View File

@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;
contract C {
function f() pure public {
assembly ("memory-safe") {
function f() -> x {
x := mload(0)
}
// Presence of msize disables all Yul optimizations, including the minimal steps or
// stack optimization that would normally be performed even with the optimizer nominally disabled.
// This block should remain untouched when passed through the optimizer.
pop(msize())
let x := 0
let y := x
mstore(0, f())
}
}
}

View File

@ -0,0 +1,261 @@
======= viair_msize_without_optimizer/input.sol:C =======
EVM assembly:
mstore(0x40, 0x80)
jumpi(tag_4, iszero(callvalue))
tag_5
tag_2
jump // in
tag_5:
tag_4:
tag_6
tag_3
jump // in
tag_6:
tag_7
tag_1
jump // in
tag_7:
dataSize(sub_0)
dataOffset(sub_0)
dup3
codecopy
dataSize(sub_0)
dup2
return
tag_1:
0x00
mload(0x40)
swap1
pop
swap1
jump // out
tag_2:
0x00
dup1
revert
tag_3:
jump // out
stop
sub_0: assembly {
mstore(0x40, 0x80)
jumpi(tag_10, lt(calldatasize, 0x04))
tag_11
calldataload(0x00)
tag_1
jump // in
tag_11:
dup1
0x26121ff0
dup2
sub
tag_12
jumpi
tag_14
tag_7
jump // in
tag_14:
tag_12:
pop
pop
tag_10:
tag_15
tag_8
jump // in
tag_15:
jump(tag_16)
tag_1:
0x00
dup2
0xe0
shr
swap1
pop
swap2
swap1
pop
jump // out
tag_2:
0x00
mload(0x40)
swap1
pop
swap1
jump // out
tag_3:
0x00
dup1
revert
tag_4:
0x00
dup1
revert
tag_5:
0x00
dup2
dup4
sub
slt
iszero
tag_22
jumpi
tag_23
tag_4
jump // in
tag_23:
tag_22:
pop
pop
jump // out
tag_6:
0x00
dup1
dup3
add
swap1
pop
swap2
swap1
pop
jump // out
tag_7:
jumpi(tag_26, iszero(callvalue))
tag_27
tag_3
jump // in
tag_27:
tag_26:
tag_28
calldatasize
0x04
tag_5
jump // in
tag_28:
tag_29
tag_9
jump // in
tag_29:
tag_30
tag_2
jump // in
tag_30:
tag_31
dup2
tag_6
jump // in
tag_31:
dup2
dup2
sub
dup3
return
tag_8:
0x00
dup1
revert
tag_9:
jump(tag_35)
tag_34:
0x00
dup1
mload
swap1
pop
swap1
jump // out
tag_35:
0x00
dup1
tag_37
tag_34
jump // in
tag_37:
0x00
mstore
pop
pop
jump // out
tag_16:
auxdata: <AUXDATA REMOVED>
}
Optimized IR:
/// @use-src 0:"viair_msize_without_optimizer/input.sol"
object "C_7" {
code {
mstore(64, memoryguard(128))
if callvalue()
{
revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
}
constructor_C_7()
let _1 := allocate_unbounded()
codecopy(_1, dataoffset("C_7_deployed"), datasize("C_7_deployed"))
return(_1, datasize("C_7_deployed"))
function allocate_unbounded() -> memPtr
{ memPtr := mload(64) }
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
{ revert(0, 0) }
function constructor_C_7()
{ }
}
/// @use-src 0:"viair_msize_without_optimizer/input.sol"
object "C_7_deployed" {
code {
mstore(64, memoryguard(128))
if iszero(lt(calldatasize(), 4))
{
let selector := shift_right_224_unsigned(calldataload(0))
switch selector
case 0x26121ff0 { external_fun_f_6() }
default { }
}
revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74()
function shift_right_224_unsigned(value) -> newValue
{ newValue := shr(224, value) }
function allocate_unbounded() -> memPtr
{ memPtr := mload(64) }
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
{ revert(0, 0) }
function revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b()
{ revert(0, 0) }
function abi_decode_tuple_(headStart, dataEnd)
{
if slt(sub(dataEnd, headStart), 0)
{
revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b()
}
}
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) }
function fun_f_6()
{
{
function usr$f() -> usr$x
{ usr$x := mload(0) }
pop(msize())
let usr$x := 0
let usr$y := usr$x
mstore(0, usr$f())
}
}
}
data ".metadata" hex"<BYTECODE REMOVED>"
}
}

View File

@ -4,63 +4,43 @@
Pretty printed source:
object "object" {
code {
let a
let b
{
function z() -> y
{ y := calldataload(0) }
let a
let b
a := z()
b := z_1()
sstore(a, b)
}
{
function z() -> y
{ y := calldataload(0x20) }
b := z()
}
sstore(a, b)
function z() -> y
{ y := calldataload(0) }
function z_1() -> y
{ y := calldataload(0x20) }
}
}
Binary representation:
5f80600d565b5f8035905090565b60136005565b91506022565b5f602035905090565b60286019565b90508082555050
6005600f565b600b6014565b9055005b5f3590565b6020359056
Text representation:
0x00
dup1
jump(tag_2)
tag_3
tag_1
jump // in
tag_3:
tag_4
tag_2
jump // in
tag_4:
swap1
sstore
stop
tag_1:
0x00
dup1
calldataload
swap1
pop
swap1
jump // out
tag_2:
tag_4
tag_1
jump // in
tag_4:
swap2
pop
jump(tag_6)
tag_5:
0x00
0x20
calldataload
swap1
pop
swap1
jump // out
tag_6:
tag_8
tag_5
jump // in
tag_8:
swap1
pop
dup1
dup3
sstore
pop
pop

View File

@ -4,90 +4,56 @@
Pretty printed source:
object "object" {
code {
let a
let b
{
function z() -> y
{ y := calldataload(0) }
let a
let b
a := z()
b := z_1(0x70)
sstore(a, b)
}
{
function z(r) -> y
{ y := calldataload(r) }
b := z(0x70)
}
sstore(a, b)
function z() -> y
{ y := calldataload(0) }
function z_1(r) -> y
{ y := calldataload(r) }
}
}
Binary representation:
5f80600d565b5f8035905090565b60136005565b91506023565b5f81359050919050565b602b60706019565b90508082555050
60056011565b600d60706016565b9055005b5f3590565b359056
Text representation:
/* "yul_function_name_clashes_different_params/input.yul":37:42 */
0x00
/* "yul_function_name_clashes_different_params/input.yul":51:56 */
dup1
/* "yul_function_name_clashes_different_params/input.yul":79:133 */
jump(tag_2)
tag_1:
/* "yul_function_name_clashes_different_params/input.yul":95:96 */
0x00
/* "yul_function_name_clashes_different_params/input.yul":129:130 */
dup1
/* "yul_function_name_clashes_different_params/input.yul":116:131 */
calldataload
/* "yul_function_name_clashes_different_params/input.yul":111:131 */
swap1
pop
/* "yul_function_name_clashes_different_params/input.yul":79:133 */
swap1
jump // out
tag_2:
/* "yul_function_name_clashes_different_params/input.yul":151:154 */
tag_4
tag_3
tag_1
jump // in
tag_4:
/* "yul_function_name_clashes_different_params/input.yul":146:154 */
swap2
pop
/* "yul_function_name_clashes_different_params/input.yul":187:242 */
jump(tag_6)
tag_5:
/* "yul_function_name_clashes_different_params/input.yul":204:205 */
0x00
/* "yul_function_name_clashes_different_params/input.yul":238:239 */
dup2
/* "yul_function_name_clashes_different_params/input.yul":225:240 */
calldataload
/* "yul_function_name_clashes_different_params/input.yul":220:240 */
swap1
pop
/* "yul_function_name_clashes_different_params/input.yul":187:242 */
swap2
swap1
pop
jump // out
tag_6:
tag_3:
/* "yul_function_name_clashes_different_params/input.yul":260:267 */
tag_8
tag_4
/* "yul_function_name_clashes_different_params/input.yul":262:266 */
0x70
/* "yul_function_name_clashes_different_params/input.yul":260:267 */
tag_5
tag_2
jump // in
tag_8:
/* "yul_function_name_clashes_different_params/input.yul":255:267 */
swap1
pop
/* "yul_function_name_clashes_different_params/input.yul":296:297 */
dup1
/* "yul_function_name_clashes_different_params/input.yul":293:294 */
dup3
tag_4:
/* "yul_function_name_clashes_different_params/input.yul":286:298 */
swap1
sstore
/* "yul_function_name_clashes_different_params/input.yul":27:304 */
pop
pop
stop
/* "yul_function_name_clashes_different_params/input.yul":79:133 */
tag_1:
/* "yul_function_name_clashes_different_params/input.yul":129:130 */
0x00
/* "yul_function_name_clashes_different_params/input.yul":116:131 */
calldataload
/* "yul_function_name_clashes_different_params/input.yul":79:133 */
swap1
jump // out
/* "yul_function_name_clashes_different_params/input.yul":187:242 */
tag_2:
/* "yul_function_name_clashes_different_params/input.yul":225:240 */
calldataload
/* "yul_function_name_clashes_different_params/input.yul":187:242 */
swap1
jump // out

View File

@ -36,8 +36,8 @@ echo '{}' | "$SOLC" - --yul --optimize &>/dev/null && fail "solc --yul --optimiz
# Test yul and strict assembly output
# Non-empty code results in non-empty binary representation with optimizations turned off,
# while it results in empty binary representation with optimizations turned on.
test_solc_assembly_output "{ let x:u256 := 0:u256 }" "{ let x := 0 }" "--yul"
test_solc_assembly_output "{ let x:u256 := bitnot(7:u256) }" "{ let x := bitnot(7) }" "--yul"
test_solc_assembly_output "{ let t:bool := not(true) }" "{ let t:bool := not(true) }" "--yul"
test_solc_assembly_output "{ let x := 0 }" "{ let x := 0 }" "--strict-assembly"
test_solc_assembly_output "{ let x := 0 }" "{ { } }" "--strict-assembly --optimize"
test_solc_assembly_output "{ let x:u256 := 0:u256 mstore(0, x) }" "{ { let x := 0 mstore(0, x) } }" "--yul"
test_solc_assembly_output "{ let x:u256 := bitnot(7:u256) mstore(0, x) }" "{ { let x := bitnot(7) mstore(0, x) } }" "--yul"
test_solc_assembly_output "{ let t:bool := not(true) if t { mstore(0, 1) } }" "{ { let t:bool := not(true) if t { mstore(0, 1) } } }" "--yul"
test_solc_assembly_output "{ let x := 0 mstore(0, x) }" "{ { let x := 0 mstore(0, x) } }" "--strict-assembly"
test_solc_assembly_output "{ let x := 0 mstore(0, x) }" "{ { } }" "--strict-assembly --optimize"

View File

@ -46,8 +46,8 @@ function bleeps_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with: "YulException: Variable param_0 is 2 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable param_0 is 2 slot(s) too deep inside the stack."
#ir-no-optimize # Compilation fails with: "YulException: Variable expr_15509_mpos is 4 too deep in the stack". No memoryguard was present.
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable expr_15260_mpos is 4 too deep in the stack". No memoryguard was present.
ir-optimize-evm+yul
#legacy-no-optimize # Compilation fails with: "CompilerError: Stack too deep, try removing local variables."
#legacy-optimize-evm-only # Compilation fails with: "CompilerError: Stack too deep, try removing local variables."

View File

@ -45,8 +45,8 @@ function brink_test
local extra_optimizer_settings="runs: 800"
local compile_only_presets=(
#ir-no-optimize # Compilation fails with "YulException: Variable var_signature_127_offset is 2 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_signature_127_offset is 2 slot(s) too deep inside the stack."
ir-no-optimize # Lots of test failures. Tests depend on constants.js, which seems to be calculated specifically for 0.8.10.
ir-optimize-evm-only # Lots of test failures. Tests depend on constants.js, which seems to be calculated specifically for 0.8.10.
ir-optimize-evm+yul # Lots of test failures. Tests depend on constants.js, which seems to be calculated specifically for 0.8.10.
legacy-optimize-evm+yul # Lots of test failures. Tests depend on constants.js, which seems to be calculated specifically for 0.8.10.
legacy-no-optimize # Lots of test failures. Tests depend on constants.js, which seems to be calculated specifically for 0.8.10.

View File

@ -47,8 +47,8 @@ function chainlink_test
)
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var__value_775 is 1 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var__value_10 is 1 slot(s) too deep inside the stack"
#ir-no-optimize # Compilation fails with "YulException: Variable expr_10724_mpos is 2 too deep in the stack". No memoryguard was present.
#ir-optimize-evm-only # Compilation fails with "YulException: Variable expr_1891_mpos is 2 too deep in the stack". No memoryguard was present.
ir-optimize-evm+yul
legacy-optimize-evm-only # NOTE: This requires >= 4 GB RAM in CI not to crash
legacy-optimize-evm+yul # NOTE: This requires >= 4 GB RAM in CI not to crash

View File

@ -45,8 +45,8 @@ function elementfi_test
local compile_only_presets=(
# ElementFi's test suite is hard-coded for Mainnet forked via alchemy.io.
# Locally we can only compile.
#ir-no-optimize # Compilation fails with "YulException: Variable var_amount_9311 is 10 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_amount_9311 is 10 slot(s) too deep inside the stack."
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only

View File

@ -42,13 +42,13 @@ function ens_test
local config_file="hardhat.config.js"
local compile_only_presets=(
ir-no-optimize # FIXME: Tests fail with "Error: cannot estimate gas; transaction may fail or may require manual gas limit"
legacy-no-optimize # Compiles but tests fail to deploy GovernorCompatibilityBravo (code too large).
)
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var__945 is 1 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var__945 is 1 slot(s) too deep inside the stack."
ir-optimize-evm+yul # Needs memory-safe inline assembly patch
ir-optimize-evm-only
ir-optimize-evm+yul # Needs memory-safe inline assembly patch
legacy-optimize-evm-only
legacy-optimize-evm+yul
)

View File

@ -47,8 +47,8 @@ function euler_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack."
#ir-no-optimize # Compilation fails with "YulException: Variable var_v_mpos is 4 too deep in the stack". No memoryguard was present.
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_v_mpos is 4 too deep in the stack". No memoryguard was present.
ir-optimize-evm+yul
legacy-optimize-evm-only
legacy-optimize-evm+yul

View File

@ -45,8 +45,8 @@ function gnosis_safe_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_call_430_mpos is 1 slot(s) too deep inside the stack."
#ir-no-optimize # Compilation fails with "YulException: Variable var_txHash is 1 too deep in the stack". No memoryguard was present.
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_txHash is 1 too deep in the stack". No memoryguard was present.
# TODO: Uncomment the preset below when the issue: https://github.com/safe-global/safe-contracts/issues/544 is solved.
#ir-optimize-evm+yul # Compilation fails with "YulException: Cannot swap Variable var_operation with Variable _1: too deep in the stack by 4 slots."
legacy-no-optimize

View File

@ -43,12 +43,12 @@ function gp2_test
local config_var="config"
local compile_only_presets=(
legacy-no-optimize # Tests doing `new GPv2VaultRelayer` fail with "Error: Transaction reverted: trying to deploy a contract whose code is too large"
ir-no-optimize # Tests fail with "Error: Transaction reverted: trying to deploy a contract whose code is too large"
legacy-no-optimize # Tests fail with "Error: Transaction reverted: trying to deploy a contract whose code is too large"
)
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_amount_1468 is 10 slot(s) too deep inside the stack."
#ir-no-optimize # Compilation fails with "YulException: Variable var_offset_3451 is 1 slot(s) too deep inside the stack."
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-optimize-evm-only
legacy-optimize-evm+yul

View File

@ -45,8 +45,8 @@ function perpetual_pools_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack."
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only

View File

@ -45,8 +45,8 @@ function pool_together_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_amount_205 is 9 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_amount_205 is 9 slot(s) too deep inside the stack."
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only

View File

@ -45,11 +45,12 @@ function prb_math_test
local config_file="hardhat.config.ts"
local config_var="config"
local compile_only_presets=()
local compile_only_presets=(
ir-no-optimize # Tests fail with "Error: Transaction reverted: trying to deploy a contract whose code is too large"
)
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_y_1960 is 8 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_y_1960 is 8 slot(s) too deep inside the stack."
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-optimize-evm-only
legacy-optimize-evm+yul

View File

@ -54,9 +54,9 @@ function trident_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with: "YulException: Variable var_amount_165 is 9 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable var_amount_165 is 9 slot(s) too deep inside the stack."
ir-optimize-evm+yul # Needs memory-safe inline assembly patch
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul # Needs memory-safe inline assembly patch
legacy-no-optimize
legacy-optimize-evm-only
legacy-optimize-evm+yul

View File

@ -45,8 +45,8 @@ function uniswap_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with: "YulException: Variable ret_0 is 1 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable ret_0 is 1 slot(s) too deep inside the stack."
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only

View File

@ -45,8 +45,8 @@ function yield_liquidator_test
local compile_only_presets=()
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_roles_168_mpos is 2 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var__33 is 6 slot(s) too deep inside the stack."
ir-no-optimize
ir-optimize-evm-only
ir-optimize-evm+yul
legacy-optimize-evm-only
legacy-optimize-evm+yul

View File

@ -46,11 +46,12 @@ function zeppelin_test
local ref="master"
local config_file="hardhat.config.js"
local compile_only_presets=()
local compile_only_presets=(
#ir-no-optimize # Compilation fails with "Contract initcode size is 49410 bytes and exceeds 49152 bytes (a limit introduced in Shanghai)."
ir-optimize-evm-only # FIXME: A few tests fail with "Transaction: ... exited with an error (status 0) after consuming all gas."
)
local settings_presets=(
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_account_852 is 4 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_account_852 is 4 slot(s) too deep inside the stack."
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only

View File

@ -5,8 +5,10 @@ object "a" {
}
// ----
// Assembly:
// /* "source":20:22 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// Bytecode: fe
// Opcodes: INVALID
// SourceMappings:
// Bytecode: 00fe
// Opcodes: STOP INVALID
// SourceMappings: 20:2:0:-:0

View File

@ -42,9 +42,11 @@ object "a" {
// 0x00
// /* "source":178:206 */
// mstore
// /* "source":135:212 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// }
// Bytecode: 6008600b5f3960085ff3fe5f8055600d5f52fe
// Opcodes: PUSH1 0x8 PUSH1 0xB PUSH0 CODECOPY PUSH1 0x8 PUSH0 RETURN INVALID PUSH0 DUP1 SSTORE PUSH1 0xD PUSH0 MSTORE INVALID
// Bytecode: 6009600b5f3960095ff3fe5f8055600d5f5200fe
// Opcodes: PUSH1 0x9 PUSH1 0xB PUSH0 CODECOPY PUSH1 0x9 PUSH0 RETURN INVALID PUSH0 DUP1 SSTORE PUSH1 0xD PUSH0 MSTORE STOP INVALID
// SourceMappings: 57:15:0:-:0;38:17;35:1;26:47;88:15;85:1;78:26

View File

@ -13,6 +13,8 @@ object "a" {
// 0x00
// /* "source":22:50 */
// sstore
// /* "source":20:52 */
// stop
// stop
//
// sub_0: assembly {
@ -22,9 +24,11 @@ object "a" {
// 0x00
// /* "source":81:93 */
// sstore
// /* "source":79:95 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// }
// Bytecode: 60055f55fe60085f55fe
// Opcodes: PUSH1 0x5 PUSH0 SSTORE INVALID PUSH1 0x8 PUSH0 SSTORE INVALID
// SourceMappings: 32:17:0:-:0;29:1;22:28
// Bytecode: 60065f5500fe60085f5500fe
// Opcodes: PUSH1 0x6 PUSH0 SSTORE STOP INVALID PUSH1 0x8 PUSH0 SSTORE STOP INVALID
// SourceMappings: 32:17:0:-:0;29:1;22:28;20:32

View File

@ -10,8 +10,10 @@ object "a" {
// 0x00
// /* "source":22:52 */
// sstore
// /* "source":20:54 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// Bytecode: 60055f55fe48656c6c6f2c20576f726c6421
// Opcodes: PUSH1 0x5 PUSH0 SSTORE INVALID BASEFEE PUSH6 0x6C6C6F2C2057 PUSH16 0x726C6421000000000000000000000000
// SourceMappings: 32:19:0:-:0;29:1;22:30
// Bytecode: 60065f5500fe48656c6c6f2c20576f726c6421
// Opcodes: PUSH1 0x6 PUSH0 SSTORE STOP INVALID BASEFEE PUSH6 0x6C6C6F2C2057 PUSH16 0x726C6421000000000000000000000000
// SourceMappings: 32:19:0:-:0;29:1;22:30;20:34

View File

@ -10,8 +10,10 @@ object "a" {
// dup1
// /* "source":22:48 */
// sstore
// /* "source":20:50 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// Bytecode: 5f8055fe
// Opcodes: PUSH0 DUP1 SSTORE INVALID
// SourceMappings: 32:15:0:-:0;29:1;22:26
// Bytecode: 5f805500fe
// Opcodes: PUSH0 DUP1 SSTORE STOP INVALID
// SourceMappings: 32:15:0:-:0;29:1;22:26;20:30

View File

@ -13,6 +13,8 @@ object "a" {
// 0x00
// /* "source":22:48 */
// sstore
// /* "source":20:50 */
// stop
// stop
//
// sub_0: assembly {
@ -22,9 +24,11 @@ object "a" {
// 0x00
// /* "source":79:91 */
// sstore
// /* "source":77:93 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// }
// Bytecode: 60055f55fe
// Opcodes: PUSH1 0x5 PUSH0 SSTORE INVALID
// SourceMappings: 32:15:0:-:0;29:1;22:26
// Bytecode: 60065f5500fe
// Opcodes: PUSH1 0x6 PUSH0 SSTORE STOP INVALID
// SourceMappings: 32:15:0:-:0;29:1;22:26;20:30

View File

@ -10,8 +10,10 @@ object "a" {
// 0x00
// /* "source":22:50 */
// sstore
// /* "source":20:52 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// Bytecode: 600d5f55fe
// Opcodes: PUSH1 0xD PUSH0 SSTORE INVALID
// SourceMappings: 32:17:0:-:0;29:1;22:28
// Bytecode: 600d5f5500fe
// Opcodes: PUSH1 0xD PUSH0 SSTORE STOP INVALID
// SourceMappings: 32:17:0:-:0;29:1;22:28;20:32

View File

@ -10,8 +10,10 @@ object "a" {
// 0x00
// /* "source":22:46 */
// sstore
// /* "source":20:48 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// Bytecode: 60055f55fe
// Opcodes: PUSH1 0x5 PUSH0 SSTORE INVALID
// SourceMappings: 32:13:0:-:0;29:1;22:24
// Bytecode: 60065f5500fe
// Opcodes: PUSH1 0x6 PUSH0 SSTORE STOP INVALID
// SourceMappings: 32:13:0:-:0;29:1;22:24;20:28

View File

@ -3,6 +3,10 @@ object "Contract" {
function f() {}
function g() {}
sstore(0, 1)
// NOTE: msize forces the compiler to completely disable the Yul optimizer.
// Otherwise the functions would get optimized out.
pop(msize())
}
}
@ -26,6 +30,10 @@ object "Contract" {
// 0x00
// /* "source":73:85 */
// sstore
// Bytecode: 6009565b5b565b5b565b60015f55
// Opcodes: PUSH1 0x9 JUMP JUMPDEST JUMPDEST JUMP JUMPDEST JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH0 SSTORE
// SourceMappings: 33:15:0:-:0;;;;:::o;53:::-;;:::o;:::-;83:1;80;73:12
// /* "source":231:238 */
// msize
// /* "source":227:239 */
// pop
// Bytecode: 6009565b5b565b5b565b60015f555950
// Opcodes: PUSH1 0x9 JUMP JUMPDEST JUMPDEST JUMP JUMPDEST JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH0 SSTORE MSIZE POP
// SourceMappings: 33:15:0:-:0;;;;:::o;53:::-;;:::o;:::-;83:1;80;73:12;231:7;227:12

View File

@ -15,6 +15,8 @@ object "a" {
// 0x00
// /* "source":32:219 */
// assignImmutable("0x85a5b1db611c82c46f5fa18e39ae218397536256c451e5de155a86de843a9ad6")
// Bytecode: 7312345678901234567890123456789012345678905f5050
// Opcodes: PUSH20 0x1234567890123456789012345678901234567890 PUSH0 POP POP
// SourceMappings: 167:42:0:-:0;58:1;32:187;
// /* "source":22:225 */
// stop
// Bytecode: 7312345678901234567890123456789012345678905f505000
// Opcodes: PUSH20 0x1234567890123456789012345678901234567890 PUSH0 POP POP STOP
// SourceMappings: 167:42:0:-:0;58:1;32:187;;22:203

View File

@ -3,6 +3,10 @@ object "Contract" {
function f() { g(1) }
function g(x) { if x { leave } g(add(x, 2)) }
g(1)
// NOTE: msize forces the compiler to completely disable the Yul optimizer.
// Otherwise f() would get optimized out.
pop(msize())
}
}
@ -62,6 +66,10 @@ object "Contract" {
// tag_2
// jump // in
// tag_9:
// Bytecode: 6026565b600b6001600e565b5b565b8015601857506024565b602260028201600e565b505b565b602e6001600e565b
// Opcodes: PUSH1 0x26 JUMP JUMPDEST PUSH1 0xB PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST JUMPDEST JUMP JUMPDEST DUP1 ISZERO PUSH1 0x18 JUMPI POP PUSH1 0x24 JUMP JUMPDEST PUSH1 0x22 PUSH1 0x2 DUP3 ADD PUSH1 0xE JUMP JUMPDEST POP JUMPDEST JUMP JUMPDEST PUSH1 0x2E PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST
// SourceMappings: 33:21:0:-:0;;;48:4;50:1;48:4;:::i;:::-;33:21;:::o;59:45::-;78:1;75:14;;;82:5;;;75:14;90:12;99:1;96;92:9;90:12;:::i;:::-;59:45;;:::o;:::-;109:4;111:1;109:4;:::i;:::-
// /* "source":249:256 */
// msize
// /* "source":245:257 */
// pop
// Bytecode: 6026565b600b6001600e565b5b565b8015601857506024565b602260028201600e565b505b565b602e6001600e565b5950
// Opcodes: PUSH1 0x26 JUMP JUMPDEST PUSH1 0xB PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST JUMPDEST JUMP JUMPDEST DUP1 ISZERO PUSH1 0x18 JUMPI POP PUSH1 0x24 JUMP JUMPDEST PUSH1 0x22 PUSH1 0x2 DUP3 ADD PUSH1 0xE JUMP JUMPDEST POP JUMPDEST JUMP JUMPDEST PUSH1 0x2E PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST MSIZE POP
// SourceMappings: 33:21:0:-:0;;;48:4;50:1;48:4;:::i;:::-;33:21;:::o;59:45::-;78:1;75:14;;;82:5;;;75:14;90:12;99:1;96;92:9;90:12;:::i;:::-;59:45;;:::o;:::-;109:4;111:1;109:4;:::i;:::-;249:7;245:12

View File

@ -7,7 +7,15 @@ object "a" {
}
// ----
// Assembly:
// /* "source":179:180 */
// 0x00
// /* "source":174:177 */
// 0x80
// /* "source":171:172 */
// 0x04
// /* "source":44:79 */
// dup2
// dup4
// linkerSymbol("f919ba91ac99f96129544b80b9516b27a80e376b9dc693819d0b18b7e0395612")
// /* "source":109:119 */
// 0x18530aaf
@ -15,29 +23,15 @@ object "a" {
// 0xe3
// /* "source":100:120 */
// shl
// /* "source":95:98 */
// 0x80
// /* "source":88:121 */
// dup4
// mstore
// /* "source":179:180 */
// 0x00
// /* "source":174:177 */
// 0x80
// /* "source":171:172 */
// 0x04
// /* "source":166:169 */
// 0x80
// /* "source":163:164 */
// 0x00
// /* "source":157:161 */
// dup6
// /* "source":150:155 */
// gas
// /* "source":145:181 */
// call
// /* "source":22:187 */
// pop
// pop
// Bytecode: 7300000000000000000000000000000000000000006318530aaf60e31b6080525f6080600460805f855af15050
// Opcodes: PUSH20 0x0 PUSH4 0x18530AAF PUSH1 0xE3 SHL PUSH1 0x80 MSTORE PUSH0 PUSH1 0x80 PUSH1 0x4 PUSH1 0x80 PUSH0 DUP6 GAS CALL POP POP
// SourceMappings: 44:35:0:-:0;109:10;104:3;100:20;95:3;88:33;179:1;174:3;171:1;166:3;163:1;157:4;150:5;145:36;22:165;
// /* "source":130:181 */
// stop
// Bytecode: 5f6080600481837300000000000000000000000000000000000000006318530aaf60e31b83525af100
// Opcodes: PUSH0 PUSH1 0x80 PUSH1 0x4 DUP2 DUP4 PUSH20 0x0 PUSH4 0x18530AAF PUSH1 0xE3 SHL DUP4 MSTORE GAS CALL STOP
// SourceMappings: 179:1:0:-:0;174:3;171:1;44:35;;;109:10;104:3;100:20;88:33;;150:5;145:36;130:51

View File

@ -25,21 +25,18 @@ object "A" {
// 0x0e
// /* "source":62:75 */
// 0x03
// /* "source":90:91 */
// dup2
// /* "source":80:92 */
// swap1
// /* "source":87:88 */
// 0x00
// /* "source":80:92 */
// sstore
// /* "source":108:109 */
// dup1
// /* "source":104:106 */
// 0x20
// /* "source":97:110 */
// sstore
// /* "source":20:114 */
// pop
// pop
// stop
// stop
// data_211450822d7f8c345093893187e7e1fbebc4ec67af72601920194be14104e336 48656c6c6f2c20576f726c643221
// data_e1629b9dda060bb30c7908346f6af189c16773fa148d3366701fbaa35d54f3c8 414243
@ -47,14 +44,12 @@ object "A" {
// sub_0: assembly {
// /* "source":157:176 */
// data_211450822d7f8c345093893187e7e1fbebc4ec67af72601920194be14104e336
// /* "source":193:194 */
// dup1
// /* "source":190:191 */
// 0x00
// /* "source":183:195 */
// sstore
// /* "source":140:201 */
// pop
// stop
// stop
// data_211450822d7f8c345093893187e7e1fbebc4ec67af72601920194be14104e336 48656c6c6f2c20576f726c643221
//
@ -62,6 +57,6 @@ object "A" {
// }
//
// auxdata: 0x4d32
// Bytecode: 600e6003815f55806020555050fe4d32
// Opcodes: PUSH1 0xE PUSH1 0x3 DUP2 PUSH0 SSTORE DUP1 PUSH1 0x20 SSTORE POP POP INVALID 0x4D ORIGIN
// SourceMappings: 35:13:0:-:0;62;90:1;87;80:12;108:1;104:2;97:13;20:94;
// Bytecode: 600e6003905f5560205500fe4d32
// Opcodes: PUSH1 0xE PUSH1 0x3 SWAP1 PUSH0 SSTORE PUSH1 0x20 SSTORE STOP INVALID 0x4D ORIGIN
// SourceMappings: 35:13:0:-:0;62;80:12;87:1;80:12;104:2;97:13;20:94

View File

@ -3,4 +3,8 @@ object "a" {
}
// ----
// Assembly:
// -- empty bytecode --
// /* "source":20:22 */
// stop
// Bytecode: 00
// Opcodes: STOP
// SourceMappings: 20:2:0:-:0

View File

@ -9,6 +9,8 @@ object "a" {
// 0x00
// /* "source":22:34 */
// sstore
// Bytecode: 60015f55
// Opcodes: PUSH1 0x1 PUSH0 SSTORE
// SourceMappings: 32:1:0:-:0;29;22:12
// /* "source":20:36 */
// stop
// Bytecode: 60015f5500
// Opcodes: PUSH1 0x1 PUSH0 SSTORE STOP
// SourceMappings: 32:1:0:-:0;29;22:12;20:16

View File

@ -9,6 +9,8 @@
// 0x00
// /* "source":4:16 */
// sstore
// Bytecode: 60015f55
// Opcodes: PUSH1 0x1 PUSH0 SSTORE
// SourceMappings: 14:1:0:-:0;11;4:12
// /* "source":0:18 */
// stop
// Bytecode: 60015f5500
// Opcodes: PUSH1 0x1 PUSH0 SSTORE STOP
// SourceMappings: 14:1:0:-:0;11;4:12;0:18

View File

@ -2,4 +2,8 @@
}
// ----
// Assembly:
// -- empty bytecode --
// /* "source":0:3 */
// stop
// Bytecode: 00
// Opcodes: STOP
// SourceMappings: 0:3:0:-:0

View File

@ -46,9 +46,10 @@ object "a" {
// sstore
// /* "abc.sol":2:5 */
// mstore(0x00, 0x0d)
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
// }
// Bytecode: 6008600b5f3960085ff3fe5f8055600d5f52fe
// Opcodes: PUSH1 0x8 PUSH1 0xB PUSH0 CODECOPY PUSH1 0x8 PUSH0 RETURN INVALID PUSH0 DUP1 SSTORE PUSH1 0xD PUSH0 MSTORE INVALID
// Bytecode: 6009600b5f3960095ff3fe5f8055600d5f5200fe
// Opcodes: PUSH1 0x9 PUSH1 0xB PUSH0 CODECOPY PUSH1 0x9 PUSH0 RETURN INVALID PUSH0 DUP1 SSTORE PUSH1 0xD PUSH0 MSTORE STOP INVALID
// SourceMappings: 0:2::-:0;;;;5:1;0:2;

View File

@ -6,6 +6,8 @@ object "a" {
}
// ----
// Assembly:
// /* "source":20:22 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
//
@ -16,7 +18,9 @@ object "a" {
// 0x00
// /* "source":139:151 */
// sstore
// /* "source":137:153 */
// stop
// }
// Bytecode: fe
// Opcodes: INVALID
// SourceMappings:
// Bytecode: 00fe
// Opcodes: STOP INVALID
// SourceMappings: 20:2:0:-:0

View File

@ -80,69 +80,55 @@ object "A" {
// /* "source":192:207 */
// dataSize(sub_0.sub_0)
// /* "source":224:241 */
// swap1
// dataOffset(sub_0.sub_1)
// /* "source":258:273 */
// swap3
// dataSize(sub_0.sub_1)
// /* "source":291:310 */
// swap5
// dataOffset(sub_0.sub_0.sub_0)
// /* "source":328:345 */
// swap7
// dataSize(sub_0.sub_0.sub_0)
// /* "source":361:364 */
// dup10
// /* "source":351:365 */
// swap9
// /* "source":358:359 */
// 0x00
// /* "source":351:365 */
// sstore
// /* "source":381:384 */
// dup9
// /* "source":377:379 */
// 0x20
// /* "source":370:385 */
// sstore
// /* "source":401:404 */
// dup8
// /* "source":397:399 */
// 0x40
// /* "source":390:405 */
// sstore
// /* "source":421:424 */
// dup7
// /* "source":417:419 */
// 0x60
// /* "source":410:425 */
// sstore
// /* "source":442:446 */
// dup6
// /* "source":437:440 */
// 0x80
// /* "source":430:447 */
// sstore
// /* "source":464:468 */
// dup5
// /* "source":459:462 */
// 0xa0
// /* "source":452:469 */
// sstore
// /* "source":486:490 */
// dup4
// /* "source":481:484 */
// 0xc0
// /* "source":474:491 */
// sstore
// /* "source":508:512 */
// dup3
// /* "source":503:506 */
// 0xe0
// /* "source":496:513 */
// sstore
// /* "source":530:535 */
// dup2
// /* "source":525:528 */
// 0x0100
// /* "source":518:536 */
// sstore
// /* "source":553:558 */
// dup1
// /* "source":548:551 */
// 0x0120
// /* "source":541:559 */
@ -166,41 +152,33 @@ object "A" {
// /* "source":756:769 */
// dataSize(sub_1)
// /* "source":788:805 */
// swap1
// dataOffset(sub_0.sub_0)
// /* "source":824:839 */
// swap3
// dataSize(sub_0.sub_0)
// /* "source":857:860 */
// dup6
// /* "source":847:861 */
// swap5
// /* "source":854:855 */
// 0x00
// /* "source":847:861 */
// sstore
// /* "source":879:882 */
// dup5
// /* "source":875:877 */
// 0x20
// /* "source":868:883 */
// sstore
// /* "source":901:904 */
// dup4
// /* "source":897:899 */
// 0x40
// /* "source":890:905 */
// sstore
// /* "source":923:926 */
// dup3
// /* "source":919:921 */
// 0x60
// /* "source":912:927 */
// sstore
// /* "source":946:950 */
// dup2
// /* "source":941:944 */
// 0x80
// /* "source":934:951 */
// sstore
// /* "source":970:974 */
// dup1
// /* "source":965:968 */
// 0xa0
// /* "source":958:975 */
@ -218,14 +196,12 @@ object "A" {
// dataOffset(sub_0)
// /* "source":1087:1100 */
// dataSize(sub_0)
// /* "source":1120:1123 */
// dup2
// /* "source":1110:1124 */
// swap1
// /* "source":1117:1118 */
// 0x00
// /* "source":1110:1124 */
// sstore
// /* "source":1144:1147 */
// dup1
// /* "source":1140:1142 */
// 0x20
// /* "source":1133:1148 */
@ -249,6 +225,6 @@ object "A" {
// invalid
// }
// }
// Bytecode: 5f608e6042603a607d6011607c6001607c6001895f55886020558760405586606055856080558460a0558360c0558260e055816101005580610120556101405ff3fe602860116039600160396001855f55846020558360405582606055816080558060a05560c05ff3fe60106001815f558060205560405ff3fefefefe60106001815f558060205560405ff3fefe
// Opcodes: PUSH0 PUSH1 0x8E PUSH1 0x42 PUSH1 0x3A PUSH1 0x7D PUSH1 0x11 PUSH1 0x7C PUSH1 0x1 PUSH1 0x7C PUSH1 0x1 DUP10 PUSH0 SSTORE DUP9 PUSH1 0x20 SSTORE DUP8 PUSH1 0x40 SSTORE DUP7 PUSH1 0x60 SSTORE DUP6 PUSH1 0x80 SSTORE DUP5 PUSH1 0xA0 SSTORE DUP4 PUSH1 0xC0 SSTORE DUP3 PUSH1 0xE0 SSTORE DUP2 PUSH2 0x100 SSTORE DUP1 PUSH2 0x120 SSTORE PUSH2 0x140 PUSH0 RETURN INVALID PUSH1 0x28 PUSH1 0x11 PUSH1 0x39 PUSH1 0x1 PUSH1 0x39 PUSH1 0x1 DUP6 PUSH0 SSTORE DUP5 PUSH1 0x20 SSTORE DUP4 PUSH1 0x40 SSTORE DUP3 PUSH1 0x60 SSTORE DUP2 PUSH1 0x80 SSTORE DUP1 PUSH1 0xA0 SSTORE PUSH1 0xC0 PUSH0 RETURN INVALID PUSH1 0x10 PUSH1 0x1 DUP2 PUSH0 SSTORE DUP1 PUSH1 0x20 SSTORE PUSH1 0x40 PUSH0 RETURN INVALID INVALID INVALID INVALID PUSH1 0x10 PUSH1 0x1 DUP2 PUSH0 SSTORE DUP1 PUSH1 0x20 SSTORE PUSH1 0x40 PUSH0 RETURN INVALID INVALID
// SourceMappings: 37:15:0:-:0;68:13;97:15;128:13;158:17;192:15;224:17;258:15;291:19;328:17;361:3;358:1;351:14;381:3;377:2;370:15;401:3;397:2;390:15;421:3;417:2;410:15;442:4;437:3;430:17;464:4;459:3;452:17;486:4;481:3;474:17;508:4;503:3;496:17;530:5;525:3;518:18;553:5;548:3;541:18;574:3;571:1;564:14
// Bytecode: 5f6084603d603660746010906073926001946073966001985f5560205560405560605560805560a05560c05560e05561010055610120556101405ff3fe6025601060356001906035926001945f5560205560405560605560805560a05560c05ff3fe600f6001905f5560205560405ff3fefefefe600f6001905f5560205560405ff3fefe
// Opcodes: PUSH0 PUSH1 0x84 PUSH1 0x3D PUSH1 0x36 PUSH1 0x74 PUSH1 0x10 SWAP1 PUSH1 0x73 SWAP3 PUSH1 0x1 SWAP5 PUSH1 0x73 SWAP7 PUSH1 0x1 SWAP9 PUSH0 SSTORE PUSH1 0x20 SSTORE PUSH1 0x40 SSTORE PUSH1 0x60 SSTORE PUSH1 0x80 SSTORE PUSH1 0xA0 SSTORE PUSH1 0xC0 SSTORE PUSH1 0xE0 SSTORE PUSH2 0x100 SSTORE PUSH2 0x120 SSTORE PUSH2 0x140 PUSH0 RETURN INVALID PUSH1 0x25 PUSH1 0x10 PUSH1 0x35 PUSH1 0x1 SWAP1 PUSH1 0x35 SWAP3 PUSH1 0x1 SWAP5 PUSH0 SSTORE PUSH1 0x20 SSTORE PUSH1 0x40 SSTORE PUSH1 0x60 SSTORE PUSH1 0x80 SSTORE PUSH1 0xA0 SSTORE PUSH1 0xC0 PUSH0 RETURN INVALID PUSH1 0xF PUSH1 0x1 SWAP1 PUSH0 SSTORE PUSH1 0x20 SSTORE PUSH1 0x40 PUSH0 RETURN INVALID INVALID INVALID INVALID PUSH1 0xF PUSH1 0x1 SWAP1 PUSH0 SSTORE PUSH1 0x20 SSTORE PUSH1 0x40 PUSH0 RETURN INVALID INVALID
// SourceMappings: 37:15:0:-:0;68:13;97:15;128:13;158:17;192:15;224:17;;258:15;;291:19;;328:17;;351:14;358:1;351:14;377:2;370:15;397:2;390:15;417:2;410:15;437:3;430:17;459:3;452:17;481:3;474:17;503:3;496:17;525:3;518:18;548:3;541:18;574:3;571:1;564:14

View File

@ -12,6 +12,8 @@ object "a" {
}
// ----
// Assembly:
// /* "source":20:22 */
// stop
// stop
// data_acaf3289d7b601cbd114fb36c4d29c85bbfd5e133f14cb355c3fd8d99367964f 48656c6c6f2c20576f726c6421
//
@ -22,6 +24,8 @@ object "a" {
// 0x00
// /* "source":143:155 */
// sstore
// /* "source":141:157 */
// stop
// stop
//
// sub_0: assembly {
@ -31,10 +35,12 @@ object "a" {
// 0x02
// /* "source":193:205 */
// sstore
// /* "source":191:207 */
// stop
// stop
// data_6adf031833174bbe4c85eafe59ddb54e6584648c2c962c6f94791ab49caa0ad4 123456
// }
// }
// Bytecode: fe
// Opcodes: INVALID
// SourceMappings:
// Bytecode: 00fe
// Opcodes: STOP INVALID
// SourceMappings: 20:2:0:-:0