From 1dbd8f8d672aae43f72912b8e1e475696bf741da Mon Sep 17 00:00:00 2001 From: Leonardo Alt Date: Wed, 4 Nov 2020 21:06:30 +0000 Subject: [PATCH 01/13] Fix CHC false positives when using branches inside modifiers --- Changelog.md | 1 + libsolidity/formal/CHC.cpp | 4 +- libsolidity/formal/PredicateInstance.cpp | 2 +- libsolidity/formal/PredicateSort.cpp | 2 +- libsolidity/formal/SMTEncoder.cpp | 45 +++++++++++++++++-- libsolidity/formal/SMTEncoder.h | 3 ++ .../branches_inside_modifiers_1.sol | 24 ++++++++++ .../branches_inside_modifiers_2.sol | 24 ++++++++++ .../branches_inside_modifiers_3.sol | 24 ++++++++++ .../branches_inside_modifiers_4.sol | 24 ++++++++++ 10 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_1.sol create mode 100644 test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_2.sol create mode 100644 test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_3.sol create mode 100644 test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_4.sol diff --git a/Changelog.md b/Changelog.md index 3b801c1c9..949eeff1f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -19,6 +19,7 @@ Bugfixes: * SMTChecker: Fix false negative in modifier applied multiple times. * SMTChecker: Fix internal error in the BMC engine when inherited contract from a different source unit has private state variables. * SMTChecker: Fix internal error when ``array.push()`` is used as the LHS of an assignment. + * SMTChecker: Fix CHC false positives when branches are used inside modifiers. * Code generator: Fix missing creation dependency tracking for abstract contracts. diff --git a/libsolidity/formal/CHC.cpp b/libsolidity/formal/CHC.cpp index 08b50c03f..15111dd31 100644 --- a/libsolidity/formal/CHC.cpp +++ b/libsolidity/formal/CHC.cpp @@ -746,7 +746,7 @@ void CHC::clearIndices(ContractDefinition const* _contract, FunctionDefinition c { for (auto const& var: _function->parameters() + _function->returnParameters()) m_context.variable(*var)->increaseIndex(); - for (auto const& var: _function->localVariables()) + for (auto const& var: localVariablesIncludingModifiers(*_function)) m_context.variable(*var)->increaseIndex(); } @@ -821,7 +821,7 @@ void CHC::defineInterfacesAndSummaries(SourceUnit const& _source) createVariable(*var); for (auto var: function->returnParameters()) createVariable(*var); - for (auto const* var: function->localVariables()) + for (auto const* var: localVariablesIncludingModifiers(*function)) createVariable(*var); m_summaries[contract].emplace(function, createSummaryBlock(*function, *contract)); diff --git a/libsolidity/formal/PredicateInstance.cpp b/libsolidity/formal/PredicateInstance.cpp index 29a6e75d8..3c38d4d60 100644 --- a/libsolidity/formal/PredicateInstance.cpp +++ b/libsolidity/formal/PredicateInstance.cpp @@ -132,7 +132,7 @@ vector currentBlockVariables(FunctionDefinition const& _fun { return currentFunctionVariables(_function, _contract, _context) + applyMap( - _function.localVariables(), + SMTEncoder::localVariablesIncludingModifiers(_function), [&](auto _var) { return _context.variable(*_var)->currentValue(); } ); } diff --git a/libsolidity/formal/PredicateSort.cpp b/libsolidity/formal/PredicateSort.cpp index ac730d7a5..18fcbdfc3 100644 --- a/libsolidity/formal/PredicateSort.cpp +++ b/libsolidity/formal/PredicateSort.cpp @@ -90,7 +90,7 @@ SortPointer functionBodySort(FunctionDefinition const& _function, ContractDefini auto smtSort = [](auto _var) { return smt::smtSortAbstractFunction(*_var->type()); }; return make_shared( - fSort->domain + applyMap(_function.localVariables(), smtSort), + fSort->domain + applyMap(SMTEncoder::localVariablesIncludingModifiers(_function), smtSort), SortProvider::boolSort ); } diff --git a/libsolidity/formal/SMTEncoder.cpp b/libsolidity/formal/SMTEncoder.cpp index b2aa31400..a81e63184 100644 --- a/libsolidity/formal/SMTEncoder.cpp +++ b/libsolidity/formal/SMTEncoder.cpp @@ -1989,7 +1989,12 @@ void SMTEncoder::initializeFunctionCallParameters(CallableDeclaration const& _fu m_arrayAssignmentHappened = true; } - for (auto const& variable: _function.localVariables()) + vector localVars; + if (auto const* fun = dynamic_cast(&_function)) + localVars = localVariablesIncludingModifiers(*fun); + else + localVars = _function.localVariables(); + for (auto const& variable: localVars) if (createVariable(*variable)) { m_context.newValue(*variable); @@ -2029,7 +2034,7 @@ void SMTEncoder::initializeStateVariables(ContractDefinition const& _contract) void SMTEncoder::createLocalVariables(FunctionDefinition const& _function) { - for (auto const& variable: _function.localVariables()) + for (auto const& variable: localVariablesIncludingModifiers(_function)) createVariable(*variable); for (auto const& param: _function.parameters()) @@ -2042,7 +2047,7 @@ void SMTEncoder::createLocalVariables(FunctionDefinition const& _function) void SMTEncoder::initializeLocalVariables(FunctionDefinition const& _function) { - for (auto const& variable: _function.localVariables()) + for (auto const& variable: localVariablesIncludingModifiers(_function)) { solAssert(m_context.knownVariable(*variable), ""); m_context.setZeroValue(*variable); @@ -2297,7 +2302,7 @@ void SMTEncoder::clearIndices(ContractDefinition const* _contract, FunctionDefin { for (auto const& var: _function->parameters() + _function->returnParameters()) m_context.variable(*var)->resetIndex(); - for (auto const& var: _function->localVariables()) + for (auto const& var: localVariablesIncludingModifiers(*_function)) m_context.variable(*var)->resetIndex(); } m_context.state().reset(); @@ -2432,6 +2437,38 @@ vector SMTEncoder::stateVariablesIncludingInheritedA return stateVariablesIncludingInheritedAndPrivate(dynamic_cast(*_function.scope())); } +vector SMTEncoder::localVariablesIncludingModifiers(FunctionDefinition const& _function) +{ + return _function.localVariables() + modifiersVariables(_function); +} + +vector SMTEncoder::modifiersVariables(FunctionDefinition const& _function) +{ + struct BlockVars: ASTConstVisitor + { + BlockVars(Block const& _block) { _block.accept(*this); } + void endVisit(VariableDeclaration const& _var) { vars.push_back(&_var); } + vector vars; + }; + + vector vars; + set visited; + for (auto invok: _function.modifiers()) + { + if (!invok) + continue; + auto decl = invok->name()->annotation().referencedDeclaration; + auto const* modifier = dynamic_cast(decl); + if (!modifier || visited.count(modifier)) + continue; + + visited.insert(modifier); + vars += applyMap(modifier->parameters(), [](auto _var) { return _var.get(); }); + vars += BlockVars(modifier->body()).vars; + } + return vars; +} + SourceUnit const* SMTEncoder::sourceUnitContaining(Scopable const& _scopable) { for (auto const* s = &_scopable; s; s = dynamic_cast(s->scope())) diff --git a/libsolidity/formal/SMTEncoder.h b/libsolidity/formal/SMTEncoder.h index 366cfc0b2..49cac0082 100644 --- a/libsolidity/formal/SMTEncoder.h +++ b/libsolidity/formal/SMTEncoder.h @@ -71,6 +71,9 @@ public: static std::vector stateVariablesIncludingInheritedAndPrivate(ContractDefinition const& _contract); static std::vector stateVariablesIncludingInheritedAndPrivate(FunctionDefinition const& _function); + static std::vector localVariablesIncludingModifiers(FunctionDefinition const& _function); + static std::vector modifiersVariables(FunctionDefinition const& _function); + /// @returns the SourceUnit that contains _scopable. static SourceUnit const* sourceUnitContaining(Scopable const& _scopable); diff --git a/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_1.sol b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_1.sol new file mode 100644 index 000000000..151ea9216 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_1.sol @@ -0,0 +1,24 @@ +pragma experimental SMTChecker; +contract C { + uint x; + modifier m(uint z) { + uint y = 3; + if (z == 10) + x = 2 + y; + _; + if (z == 10) + x = 4 + y; + } + function f() m(10) internal { + x = 3; + } + function g() public { + x = 0; + f(); + assert(x == 7); + // Fails + assert(x == 6); + } +} +// ---- +// Warning 6328: (359-373): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_2.sol b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_2.sol new file mode 100644 index 000000000..e1c66050d --- /dev/null +++ b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_2.sol @@ -0,0 +1,24 @@ +pragma experimental SMTChecker; +contract C { + uint x; + modifier m(uint z) { + uint y = 3; + if (z == 10) + x = 2 + y; + _; + if (z == 10) + x = 4 + y; + } + function f() m(10) m(12) internal { + x = 3; + } + function g() public { + x = 0; + f(); + assert(x == 3); + // Fails + assert(x == 6); + } +} +// ---- +// Warning 6328: (365-379): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_3.sol b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_3.sol new file mode 100644 index 000000000..816ffc600 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_3.sol @@ -0,0 +1,24 @@ +pragma experimental SMTChecker; +contract C { + uint x; + modifier m(uint z) { + uint y = 3; + if (z == 10) + x = 2 + y; + _; + if (z == 10) + x = 4 + y; + } + function f() m(8) internal { + x = 3; + } + function g() public { + x = 0; + f(); + assert(x == 3); + // Fails + assert(x == 6); + } +} +// ---- +// Warning 6328: (358-372): CHC: Assertion violation happens here. diff --git a/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_4.sol b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_4.sol new file mode 100644 index 000000000..2817f16d2 --- /dev/null +++ b/test/libsolidity/smtCheckerTests/control_flow/branches_inside_modifiers_4.sol @@ -0,0 +1,24 @@ +pragma experimental SMTChecker; +contract C { + uint x; + modifier m(uint z) { + uint y = 3; + if (z >= 10) + x = 2 + y; + _; + if (z >= 10) + x = 4 + y; + } + function f() m(10) m(12) internal { + x = 3; + } + function g() public { + x = 0; + f(); + assert(x == 7); + // Fails + assert(x == 6); + } +} +// ---- +// Warning 6328: (365-379): CHC: Assertion violation happens here. From df00f4d163c790eacef1e1dd76d3817350189b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Sat, 7 Nov 2020 15:25:21 +0100 Subject: [PATCH 02/13] .editorconfig: Define indentation rules for JSON files --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 829878823..0f19ed338 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,6 +18,6 @@ indent_size = 4 indent_style = space indent_size = 4 -[*.{txt,cmake}] +[*.{txt,cmake,json}] indent_style = tab indent_size = 4 From 0e4edc8424a510b9fc6549c9ba7d43b93bace311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 4 Nov 2020 19:34:53 +0100 Subject: [PATCH 03/13] Strip bytecode from command-line test output but leave linker references intact --- test/cmdlineTests.sh | 18 ++++++++++++++++-- .../output_selection_all_A1/output.json | 2 +- .../output_selection_all_A2/output.json | 2 +- .../output_selection_all_star/output.json | 2 +- .../output_selection_single_A1/output.json | 2 +- .../output_selection_single_B1/output.json | 2 +- .../output_selection_single_all/output.json | 2 +- .../standard_generatedSources/output.json | 4 ++-- .../standard_immutable_references/output.json | 2 +- .../output.json | 4 ++-- test/cmdlineTests/standard_yul/output.json | 2 +- .../standard_yul_object/output.json | 2 +- .../standard_yul_object_name/output.json | 2 +- .../standard_yul_optimiserSteps/output.json | 2 +- .../standard_yul_optimized/output.json | 2 +- 15 files changed, 32 insertions(+), 18 deletions(-) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 491a51261..b1b463c7a 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -112,10 +112,14 @@ function test_solc_behaviour() sed -i.bak -e 's/{[^{]*Warning: This is a pre-release compiler version[^}]*},\{0,1\}//' "$stdout_path" sed -i.bak -E -e 's/ Consider adding \\"pragma solidity \^[0-9.]*;\\"//g' "$stdout_path" sed -i.bak -e 's/"errors":\[\],\{0,1\}//' "$stdout_path" - # Remove explicit bytecode and references to bytecode offsets - sed -i.bak -E -e 's/\"object\":\"[a-f0-9]+\"/\"object\":\"bytecode removed\"/g' "$stdout_path" sed -i.bak -E -e 's/\"opcodes\":\"[^"]+\"/\"opcodes\":\"opcodes removed\"/g' "$stdout_path" sed -i.bak -E -e 's/\"sourceMap\":\"[0-9:;-]+\"/\"sourceMap\":\"sourceMap removed\"/g' "$stdout_path" + + # Remove bytecode (but not linker references). + sed -i.bak -E -e 's/(\"object\":\")[0-9a-f]+([^"]*\")/\1\2/g' "$stdout_path" + sed -i.bak -E -e 's/(\"object\":\"[^"]+\$__)[0-9a-f]+(\")/\1\2/g' "$stdout_path" + sed -i.bak -E -e 's/(__\$[0-9a-f]{34}\$__)[0-9a-f]+(__\$[0-9a-f]{34}\$__)/\1\2/g' "$stdout_path" + # Replace escaped newlines by actual newlines for readability sed -i.bak -E -e 's/\\n/\'$'\n/g' "$stdout_path" rm "$stdout_path.bak" @@ -126,6 +130,16 @@ function test_solc_behaviour() sed -i.bak -e 's/ Consider adding "pragma .*$//' "$stderr_path" sed -i.bak -e 's/\(Unimplemented feature error: .* in \).*$/\1FILENAME REMOVED/' "$stderr_path" sed -i.bak -e 's/"version": "[^"]*"/"version": "VERSION REMOVED"/' "$stdout_path" + + # Remove bytecode (but not linker references). Since non-JSON output is unstructured, + # use metadata markers for detection to have some confidence that it's actually bytecode + # and not some random word. + # 64697066735822 = hex encoding of 0x64 'i' 'p' 'f' 's' 0x58 0x22 + # 64736f6c63 = hex encoding of 0x64 's' 'o' 'l' 'c' + sed -i.bak -E -e 's/[0-9a-f]*64697066735822[0-9a-f]+64736f6c63[0-9a-f]+//g' "$stdout_path" + sed -i.bak -E -e 's/(__\$[0-9a-f]{34}\$__)[0-9a-f]+(__\$[0-9a-f]{34}\$__)/\1\2/g' "$stdout_path" + sed -i.bak -E -e 's/[0-9a-f]+((__\$[0-9a-f]{34}\$__)*)/\1/g' "$stdout_path" + # Remove trailing empty lines. Needs a line break to make OSX sed happy. sed -i.bak -e '1{/^$/d }' "$stderr_path" diff --git a/test/cmdlineTests/output_selection_all_A1/output.json b/test/cmdlineTests/output_selection_all_A1/output.json index 9f0cfa596..0d661af09 100644 --- a/test/cmdlineTests/output_selection_all_A1/output.json +++ b/test/cmdlineTests/output_selection_all_A1/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_all_A2/output.json b/test/cmdlineTests/output_selection_all_A2/output.json index ae00e3485..9b76f80f5 100644 --- a/test/cmdlineTests/output_selection_all_A2/output.json +++ b/test/cmdlineTests/output_selection_all_A2/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_all_star/output.json b/test/cmdlineTests/output_selection_all_star/output.json index 64653e63f..6b22fa6fc 100644 --- a/test/cmdlineTests/output_selection_all_star/output.json +++ b/test/cmdlineTests/output_selection_all_star/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_single_A1/output.json b/test/cmdlineTests/output_selection_single_A1/output.json index e29036fde..96bd230d3 100644 --- a/test/cmdlineTests/output_selection_single_A1/output.json +++ b/test/cmdlineTests/output_selection_single_A1/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_single_B1/output.json b/test/cmdlineTests/output_selection_single_B1/output.json index 9915b12ab..ed96ca767 100644 --- a/test/cmdlineTests/output_selection_single_B1/output.json +++ b/test/cmdlineTests/output_selection_single_B1/output.json @@ -1,4 +1,4 @@ -{"contracts":{"b.sol":{"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"b.sol":{"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ diff --git a/test/cmdlineTests/output_selection_single_all/output.json b/test/cmdlineTests/output_selection_single_all/output.json index f98685b2e..da4cf0c17 100644 --- a/test/cmdlineTests/output_selection_single_all/output.json +++ b/test/cmdlineTests/output_selection_single_all/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/standard_generatedSources/output.json b/test/cmdlineTests/standard_generatedSources/output.json index d6c9d3f36..98764ff11 100644 --- a/test/cmdlineTests/standard_generatedSources/output.json +++ b/test/cmdlineTests/standard_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2555:1","statements":[{"body":{"nodeType":"YulBlock","src":"101:684:1","statements":[{"body":{"nodeType":"YulBlock","src":"150:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"159:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"162:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"152:6:1"},"nodeType":"YulFunctionCall","src":"152:12:1"},"nodeType":"YulExpressionStatement","src":"152:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"129:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"137:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"125:3:1"},"nodeType":"YulFunctionCall","src":"125:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"144:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"121:3:1"},"nodeType":"YulFunctionCall","src":"121:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"114:6:1"},"nodeType":"YulFunctionCall","src":"114:35:1"},"nodeType":"YulIf","src":"111:2:1"},{"nodeType":"YulVariableDeclaration","src":"175:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"202:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"189:12:1"},"nodeType":"YulFunctionCall","src":"189:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"179:6:1","type":""}]},{"nodeType":"YulAssignment","src":"218:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"299:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"242:56:1"},"nodeType":"YulFunctionCall","src":"242:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"227:14:1"},"nodeType":"YulFunctionCall","src":"227:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"218:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"316:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"327:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"320:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"348:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"341:6:1"},"nodeType":"YulFunctionCall","src":"341:21:1"},"nodeType":"YulExpressionStatement","src":"341:21:1"},{"nodeType":"YulAssignment","src":"363:27:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"377:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"385:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"373:3:1"},"nodeType":"YulFunctionCall","src":"373:17:1"},"variableNames":[{"name":"offset","nodeType":"YulIdentifier","src":"363:6:1"}]},{"nodeType":"YulAssignment","src":"391:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"402:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"407:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"391:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"452:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"463:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"456:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"518:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"527:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"530:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"520:6:1"},"nodeType":"YulFunctionCall","src":"520:12:1"},"nodeType":"YulExpressionStatement","src":"520:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"488:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"497:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"505:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"493:3:1"},"nodeType":"YulFunctionCall","src":"493:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"484:3:1"},"nodeType":"YulFunctionCall","src":"484:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"513:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"481:2:1"},"nodeType":"YulFunctionCall","src":"481:36:1"},"nodeType":"YulIf","src":"478:2:1"},{"body":{"nodeType":"YulBlock","src":"603:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"617:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"621:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"658:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"684:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"696:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"663:20:1"},"nodeType":"YulFunctionCall","src":"663:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"651:6:1"},"nodeType":"YulFunctionCall","src":"651:50:1"},"nodeType":"YulExpressionStatement","src":"651:50:1"},{"nodeType":"YulAssignment","src":"714:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"725:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"730:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"721:3:1"},"nodeType":"YulFunctionCall","src":"721:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"714:3:1"}]},{"nodeType":"YulAssignment","src":"748:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"759:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"764:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"755:3:1"},"nodeType":"YulFunctionCall","src":"755:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"748:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"565:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"568:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"562:2:1"},"nodeType":"YulFunctionCall","src":"562:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"576:18:1","statements":[{"nodeType":"YulAssignment","src":"578:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"587:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"590:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"583:3:1"},"nodeType":"YulFunctionCall","src":"583:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"578:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"547:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"549:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"558:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"553:1:1","type":""}]}]},"src":"543:236:1"}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"79:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"87:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"95:5:1","type":""}],"src":"24:761:1"},{"body":{"nodeType":"YulBlock","src":"843:87:1","statements":[{"nodeType":"YulAssignment","src":"853:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"875:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"862:12:1"},"nodeType":"YulFunctionCall","src":"862:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"853:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"918:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"891:26:1"},"nodeType":"YulFunctionCall","src":"891:33:1"},"nodeType":"YulExpressionStatement","src":"891:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"821:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"829:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"837:5:1","type":""}],"src":"791:139:1"},{"body":{"nodeType":"YulBlock","src":"1027:312:1","statements":[{"body":{"nodeType":"YulBlock","src":"1073:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1082:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1085:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1075:6:1"},"nodeType":"YulFunctionCall","src":"1075:12:1"},"nodeType":"YulExpressionStatement","src":"1075:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1048:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1057:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1044:3:1"},"nodeType":"YulFunctionCall","src":"1044:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1069:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1040:3:1"},"nodeType":"YulFunctionCall","src":"1040:32:1"},"nodeType":"YulIf","src":"1037:2:1"},{"nodeType":"YulBlock","src":"1099:233:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1113:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1144:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1155:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1140:3:1"},"nodeType":"YulFunctionCall","src":"1140:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1127:12:1"},"nodeType":"YulFunctionCall","src":"1127:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1117:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1205:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1214:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1217:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1207:6:1"},"nodeType":"YulFunctionCall","src":"1207:12:1"},"nodeType":"YulExpressionStatement","src":"1207:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1177:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1185:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1174:2:1"},"nodeType":"YulFunctionCall","src":"1174:30:1"},"nodeType":"YulIf","src":"1171:2:1"},{"nodeType":"YulAssignment","src":"1234:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1294:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1305:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1290:3:1"},"nodeType":"YulFunctionCall","src":"1290:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1314:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1244:45:1"},"nodeType":"YulFunctionCall","src":"1244:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1234:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"997:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1008:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1020:6:1","type":""}],"src":"936:403:1"},{"body":{"nodeType":"YulBlock","src":"1410:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1427:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1450:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1432:17:1"},"nodeType":"YulFunctionCall","src":"1432:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1420:6:1"},"nodeType":"YulFunctionCall","src":"1420:37:1"},"nodeType":"YulExpressionStatement","src":"1420:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1398:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1405:3:1","type":""}],"src":"1345:118:1"},{"body":{"nodeType":"YulBlock","src":"1567:124:1","statements":[{"nodeType":"YulAssignment","src":"1577:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1589:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1600:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1585:3:1"},"nodeType":"YulFunctionCall","src":"1585:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1577:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1657:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1670:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1681:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1666:3:1"},"nodeType":"YulFunctionCall","src":"1666:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1613:43:1"},"nodeType":"YulFunctionCall","src":"1613:71:1"},"nodeType":"YulExpressionStatement","src":"1613:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1539:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1551:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1562:4:1","type":""}],"src":"1469:222:1"},{"body":{"nodeType":"YulBlock","src":"1737:238:1","statements":[{"nodeType":"YulAssignment","src":"1747:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1763:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1757:5:1"},"nodeType":"YulFunctionCall","src":"1757:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1747:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1775:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1797:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1805:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1793:3:1"},"nodeType":"YulFunctionCall","src":"1793:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1779:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1921:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"1923:11:1"},"nodeType":"YulFunctionCall","src":"1923:13:1"},"nodeType":"YulExpressionStatement","src":"1923:13:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1864:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1876:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1861:2:1"},"nodeType":"YulFunctionCall","src":"1861:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1900:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1912:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1897:2:1"},"nodeType":"YulFunctionCall","src":"1897:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1858:2:1"},"nodeType":"YulFunctionCall","src":"1858:62:1"},"nodeType":"YulIf","src":"1855:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1954:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1958:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1947:6:1"},"nodeType":"YulFunctionCall","src":"1947:22:1"},"nodeType":"YulExpressionStatement","src":"1947:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1721:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1730:6:1","type":""}],"src":"1697:278:1"},{"body":{"nodeType":"YulBlock","src":"2063:224:1","statements":[{"body":{"nodeType":"YulBlock","src":"2168:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"2170:11:1"},"nodeType":"YulFunctionCall","src":"2170:13:1"},"nodeType":"YulExpressionStatement","src":"2170:13:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2140:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2148:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2137:2:1"},"nodeType":"YulFunctionCall","src":"2137:30:1"},"nodeType":"YulIf","src":"2134:2:1"},{"nodeType":"YulAssignment","src":"2195:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2207:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2215:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2203:3:1"},"nodeType":"YulFunctionCall","src":"2203:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2195:4:1"}]},{"nodeType":"YulAssignment","src":"2257:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2269:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2275:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2265:3:1"},"nodeType":"YulFunctionCall","src":"2265:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2257:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2047:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2058:4:1","type":""}],"src":"1981:306:1"},{"body":{"nodeType":"YulBlock","src":"2338:32:1","statements":[{"nodeType":"YulAssignment","src":"2348:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2359:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2348:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2320:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2330:7:1","type":""}],"src":"2293:77:1"},{"body":{"nodeType":"YulBlock","src":"2399:25:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"2409:7:1"},"nodeType":"YulFunctionCall","src":"2409:9:1"},"nodeType":"YulExpressionStatement","src":"2409:9:1"}]},"name":"panic_error","nodeType":"YulFunctionDefinition","src":"2376:48:1"},{"body":{"nodeType":"YulBlock","src":"2473:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2530:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2539:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2542:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2532:6:1"},"nodeType":"YulFunctionCall","src":"2532:12:1"},"nodeType":"YulExpressionStatement","src":"2532:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2496:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2521:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2503:17:1"},"nodeType":"YulFunctionCall","src":"2503:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2493:2:1"},"nodeType":"YulFunctionCall","src":"2493:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2486:6:1"},"nodeType":"YulFunctionCall","src":"2486:43:1"},"nodeType":"YulIf","src":"2483:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2466:5:1","type":""}],"src":"2430:122:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2555:1","statements":[{"body":{"nodeType":"YulBlock","src":"101:684:1","statements":[{"body":{"nodeType":"YulBlock","src":"150:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"159:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"162:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"152:6:1"},"nodeType":"YulFunctionCall","src":"152:12:1"},"nodeType":"YulExpressionStatement","src":"152:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"129:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"137:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"125:3:1"},"nodeType":"YulFunctionCall","src":"125:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"144:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"121:3:1"},"nodeType":"YulFunctionCall","src":"121:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"114:6:1"},"nodeType":"YulFunctionCall","src":"114:35:1"},"nodeType":"YulIf","src":"111:2:1"},{"nodeType":"YulVariableDeclaration","src":"175:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"202:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"189:12:1"},"nodeType":"YulFunctionCall","src":"189:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"179:6:1","type":""}]},{"nodeType":"YulAssignment","src":"218:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"299:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"242:56:1"},"nodeType":"YulFunctionCall","src":"242:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"227:14:1"},"nodeType":"YulFunctionCall","src":"227:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"218:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"316:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"327:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"320:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"348:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"341:6:1"},"nodeType":"YulFunctionCall","src":"341:21:1"},"nodeType":"YulExpressionStatement","src":"341:21:1"},{"nodeType":"YulAssignment","src":"363:27:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"377:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"385:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"373:3:1"},"nodeType":"YulFunctionCall","src":"373:17:1"},"variableNames":[{"name":"offset","nodeType":"YulIdentifier","src":"363:6:1"}]},{"nodeType":"YulAssignment","src":"391:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"402:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"407:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"391:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"452:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"463:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"456:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"518:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"527:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"530:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"520:6:1"},"nodeType":"YulFunctionCall","src":"520:12:1"},"nodeType":"YulExpressionStatement","src":"520:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"488:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"497:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"505:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"493:3:1"},"nodeType":"YulFunctionCall","src":"493:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"484:3:1"},"nodeType":"YulFunctionCall","src":"484:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"513:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"481:2:1"},"nodeType":"YulFunctionCall","src":"481:36:1"},"nodeType":"YulIf","src":"478:2:1"},{"body":{"nodeType":"YulBlock","src":"603:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"617:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"621:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"658:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"684:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"696:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"663:20:1"},"nodeType":"YulFunctionCall","src":"663:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"651:6:1"},"nodeType":"YulFunctionCall","src":"651:50:1"},"nodeType":"YulExpressionStatement","src":"651:50:1"},{"nodeType":"YulAssignment","src":"714:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"725:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"730:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"721:3:1"},"nodeType":"YulFunctionCall","src":"721:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"714:3:1"}]},{"nodeType":"YulAssignment","src":"748:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"759:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"764:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"755:3:1"},"nodeType":"YulFunctionCall","src":"755:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"748:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"565:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"568:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"562:2:1"},"nodeType":"YulFunctionCall","src":"562:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"576:18:1","statements":[{"nodeType":"YulAssignment","src":"578:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"587:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"590:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"583:3:1"},"nodeType":"YulFunctionCall","src":"583:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"578:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"547:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"549:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"558:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"553:1:1","type":""}]}]},"src":"543:236:1"}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"79:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"87:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"95:5:1","type":""}],"src":"24:761:1"},{"body":{"nodeType":"YulBlock","src":"843:87:1","statements":[{"nodeType":"YulAssignment","src":"853:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"875:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"862:12:1"},"nodeType":"YulFunctionCall","src":"862:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"853:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"918:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"891:26:1"},"nodeType":"YulFunctionCall","src":"891:33:1"},"nodeType":"YulExpressionStatement","src":"891:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"821:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"829:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"837:5:1","type":""}],"src":"791:139:1"},{"body":{"nodeType":"YulBlock","src":"1027:312:1","statements":[{"body":{"nodeType":"YulBlock","src":"1073:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1082:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1085:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1075:6:1"},"nodeType":"YulFunctionCall","src":"1075:12:1"},"nodeType":"YulExpressionStatement","src":"1075:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1048:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1057:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1044:3:1"},"nodeType":"YulFunctionCall","src":"1044:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1069:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1040:3:1"},"nodeType":"YulFunctionCall","src":"1040:32:1"},"nodeType":"YulIf","src":"1037:2:1"},{"nodeType":"YulBlock","src":"1099:233:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1113:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1144:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1155:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1140:3:1"},"nodeType":"YulFunctionCall","src":"1140:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1127:12:1"},"nodeType":"YulFunctionCall","src":"1127:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1117:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1205:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1214:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1217:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1207:6:1"},"nodeType":"YulFunctionCall","src":"1207:12:1"},"nodeType":"YulExpressionStatement","src":"1207:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1177:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1185:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1174:2:1"},"nodeType":"YulFunctionCall","src":"1174:30:1"},"nodeType":"YulIf","src":"1171:2:1"},{"nodeType":"YulAssignment","src":"1234:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1294:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1305:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1290:3:1"},"nodeType":"YulFunctionCall","src":"1290:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1314:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1244:45:1"},"nodeType":"YulFunctionCall","src":"1244:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1234:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"997:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1008:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1020:6:1","type":""}],"src":"936:403:1"},{"body":{"nodeType":"YulBlock","src":"1410:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1427:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1450:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1432:17:1"},"nodeType":"YulFunctionCall","src":"1432:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1420:6:1"},"nodeType":"YulFunctionCall","src":"1420:37:1"},"nodeType":"YulExpressionStatement","src":"1420:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1398:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1405:3:1","type":""}],"src":"1345:118:1"},{"body":{"nodeType":"YulBlock","src":"1567:124:1","statements":[{"nodeType":"YulAssignment","src":"1577:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1589:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1600:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1585:3:1"},"nodeType":"YulFunctionCall","src":"1585:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1577:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1657:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1670:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1681:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1666:3:1"},"nodeType":"YulFunctionCall","src":"1666:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1613:43:1"},"nodeType":"YulFunctionCall","src":"1613:71:1"},"nodeType":"YulExpressionStatement","src":"1613:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1539:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1551:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1562:4:1","type":""}],"src":"1469:222:1"},{"body":{"nodeType":"YulBlock","src":"1737:238:1","statements":[{"nodeType":"YulAssignment","src":"1747:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1763:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1757:5:1"},"nodeType":"YulFunctionCall","src":"1757:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1747:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1775:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1797:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1805:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1793:3:1"},"nodeType":"YulFunctionCall","src":"1793:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1779:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1921:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"1923:11:1"},"nodeType":"YulFunctionCall","src":"1923:13:1"},"nodeType":"YulExpressionStatement","src":"1923:13:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1864:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1876:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1861:2:1"},"nodeType":"YulFunctionCall","src":"1861:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1900:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1912:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1897:2:1"},"nodeType":"YulFunctionCall","src":"1897:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1858:2:1"},"nodeType":"YulFunctionCall","src":"1858:62:1"},"nodeType":"YulIf","src":"1855:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1954:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1958:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1947:6:1"},"nodeType":"YulFunctionCall","src":"1947:22:1"},"nodeType":"YulExpressionStatement","src":"1947:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1721:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1730:6:1","type":""}],"src":"1697:278:1"},{"body":{"nodeType":"YulBlock","src":"2063:224:1","statements":[{"body":{"nodeType":"YulBlock","src":"2168:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"2170:11:1"},"nodeType":"YulFunctionCall","src":"2170:13:1"},"nodeType":"YulExpressionStatement","src":"2170:13:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2140:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2148:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2137:2:1"},"nodeType":"YulFunctionCall","src":"2137:30:1"},"nodeType":"YulIf","src":"2134:2:1"},{"nodeType":"YulAssignment","src":"2195:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2207:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2215:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2203:3:1"},"nodeType":"YulFunctionCall","src":"2203:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2195:4:1"}]},{"nodeType":"YulAssignment","src":"2257:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2269:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2275:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2265:3:1"},"nodeType":"YulFunctionCall","src":"2265:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2257:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2047:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2058:4:1","type":""}],"src":"1981:306:1"},{"body":{"nodeType":"YulBlock","src":"2338:32:1","statements":[{"nodeType":"YulAssignment","src":"2348:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2359:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2348:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2320:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2330:7:1","type":""}],"src":"2293:77:1"},{"body":{"nodeType":"YulBlock","src":"2399:25:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"2409:7:1"},"nodeType":"YulFunctionCall","src":"2409:9:1"},"nodeType":"YulExpressionStatement","src":"2409:9:1"}]},"name":"panic_error","nodeType":"YulFunctionDefinition","src":"2376:48:1"},{"body":{"nodeType":"YulBlock","src":"2473:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2530:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2539:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2542:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2532:6:1"},"nodeType":"YulFunctionCall","src":"2532:12:1"},"nodeType":"YulExpressionStatement","src":"2532:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2496:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2521:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2503:17:1"},"nodeType":"YulFunctionCall","src":"2503:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2493:2:1"},"nodeType":"YulFunctionCall","src":"2493:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2486:6:1"},"nodeType":"YulFunctionCall","src":"2486:43:1"},"nodeType":"YulIf","src":"2483:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2466:5:1","type":""}],"src":"2430:122:1"}]},"contents":"{ // uint256[] function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array { @@ -77,5 +77,5 @@ } } -","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;130:7;83:59;;;:::o;24:761:1:-;;144:3;137:4;129:6;125:17;121:27;111:2;;162:1;159;152:12;111:2;202:6;189:20;227:80;242:64;299:6;242:64;:::i;:::-;227:80;:::i;:::-;218:89;;327:5;355:6;348:5;341:21;385:4;377:6;373:17;363:27;;407:4;402:3;398:14;391:21;;463:6;513:3;505:4;497:6;493:17;488:3;484:27;481:36;478:2;;;530:1;527;520:12;478:2;558:1;543:236;568:6;565:1;562:13;543:236;;;635:3;663:37;696:3;684:10;663:37;:::i;:::-;658:3;651:50;730:4;725:3;721:14;714:21;;764:4;759:3;755:14;748:21;;603:176;590:1;587;583:9;578:14;;543:236;;;547:14;101:684;;;;;;;:::o;791:139::-;;875:6;862:20;853:29;;891:33;918:5;891:33;:::i;:::-;843:87;;;;:::o;936:403::-;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;1085:1;1082;1075:12;1037:2;1155:1;1144:9;1140:17;1127:31;1185:18;1177:6;1174:30;1171:2;;;1217:1;1214;1207:12;1171:2;1244:78;1314:7;1305:6;1294:9;1290:22;1244:78;:::i;:::-;1234:88;;1099:233;1027:312;;;;:::o;1345:118::-;1432:24;1450:5;1432:24;:::i;:::-;1427:3;1420:37;1410:53;;:::o;1469:222::-;;1600:2;1589:9;1585:18;1577:26;;1613:71;1681:1;1670:9;1666:17;1657:6;1613:71;:::i;:::-;1567:124;;;;:::o;1697:278::-;;1763:2;1757:9;1747:19;;1805:4;1797:6;1793:17;1912:6;1900:10;1897:22;1876:18;1864:10;1861:34;1858:62;1855:2;;;1923:13;;:::i;:::-;1855:2;1958:10;1954:2;1947:22;1737:238;;;;:::o;1981:306::-;;2148:18;2140:6;2137:30;2134:2;;;2170:13;;:::i;:::-;2134:2;2215:4;2207:6;2203:17;2195:25;;2275:4;2269;2265:15;2257:23;;2063:224;;;:::o;2293:77::-;;2359:5;2348:16;;2338:32;;;:::o;2376:48::-;2409:9;2430:122;2503:24;2521:5;2503:24;:::i;:::-;2496:5;2493:35;2483:2;;2542:1;2539;2532:12;2483:2;2473:79;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;130:7;83:59;;;:::o;24:761:1:-;;144:3;137:4;129:6;125:17;121:27;111:2;;162:1;159;152:12;111:2;202:6;189:20;227:80;242:64;299:6;242:64;:::i;:::-;227:80;:::i;:::-;218:89;;327:5;355:6;348:5;341:21;385:4;377:6;373:17;363:27;;407:4;402:3;398:14;391:21;;463:6;513:3;505:4;497:6;493:17;488:3;484:27;481:36;478:2;;;530:1;527;520:12;478:2;558:1;543:236;568:6;565:1;562:13;543:236;;;635:3;663:37;696:3;684:10;663:37;:::i;:::-;658:3;651:50;730:4;725:3;721:14;714:21;;764:4;759:3;755:14;748:21;;603:176;590:1;587;583:9;578:14;;543:236;;;547:14;101:684;;;;;;;:::o;791:139::-;;875:6;862:20;853:29;;891:33;918:5;891:33;:::i;:::-;843:87;;;;:::o;936:403::-;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;1085:1;1082;1075:12;1037:2;1155:1;1144:9;1140:17;1127:31;1185:18;1177:6;1174:30;1171:2;;;1217:1;1214;1207:12;1171:2;1244:78;1314:7;1305:6;1294:9;1290:22;1244:78;:::i;:::-;1234:88;;1099:233;1027:312;;;;:::o;1345:118::-;1432:24;1450:5;1432:24;:::i;:::-;1427:3;1420:37;1410:53;;:::o;1469:222::-;;1600:2;1589:9;1585:18;1577:26;;1613:71;1681:1;1670:9;1666:17;1657:6;1613:71;:::i;:::-;1567:124;;;;:::o;1697:278::-;;1763:2;1757:9;1747:19;;1805:4;1797:6;1793:17;1912:6;1900:10;1897:22;1876:18;1864:10;1861:34;1858:62;1855:2;;;1923:13;;:::i;:::-;1855:2;1958:10;1954:2;1947:22;1737:238;;;;:::o;1981:306::-;;2148:18;2140:6;2137:30;2134:2;;;2170:13;;:::i;:::-;2134:2;2215:4;2207:6;2203:17;2195:25;;2275:4;2269;2265:15;2257:23;;2063:224;;;:::o;2293:77::-;;2359:5;2348:16;;2338:32;;;:::o;2376:48::-;2409:9;2430:122;2503:24;2521:5;2503:24;:::i;:::-;2496:5;2493:35;2483:2;;2542:1;2539;2532:12;2483:2;2473:79;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_immutable_references/output.json b/test/cmdlineTests/standard_immutable_references/output.json index 2f935a12d..e3a98b198 100644 --- a/test/cmdlineTests/standard_immutable_references/output.json +++ b/test/cmdlineTests/standard_immutable_references/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"generatedSources":[],"immutableReferences":{"3":[{"length":32,"start":77}]},"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"36:96:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;108:7;126:1;119:8;;74:56;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"generatedSources":[],"immutableReferences":{"3":[{"length":32,"start":77}]},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"36:96:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;108:7;126:1;119:8;;74:56;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_optimizer_generatedSources/output.json b/test/cmdlineTests/standard_optimizer_generatedSources/output.json index 6bb53f856..aef6f86b1 100644 --- a/test/cmdlineTests/standard_optimizer_generatedSources/output.json +++ b/test/cmdlineTests/standard_optimizer_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1458:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:918:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:30:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"489:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"476:12:1"},"nodeType":"YulFunctionCall","src":"476:16:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"466:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"519:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"521:7:1"},"nodeType":"YulFunctionCall","src":"521:9:1"},"nodeType":"YulExpressionStatement","src":"521:9:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"507:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"515:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"504:2:1"},"nodeType":"YulFunctionCall","src":"504:14:1"},"nodeType":"YulIf","src":"501:2:1"},{"nodeType":"YulVariableDeclaration","src":"541:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"555:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"563:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"551:3:1"},"nodeType":"YulFunctionCall","src":"551:15:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"545:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"575:38:1","value":{"arguments":[{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"605:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"609:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"601:3:1"},"nodeType":"YulFunctionCall","src":"601:11:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"586:14:1"},"nodeType":"YulFunctionCall","src":"586:27:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"579:3:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"622:16:1","value":{"name":"dst","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"dst_1","nodeType":"YulTypedName","src":"626:5:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"654:3:1"},{"name":"length","nodeType":"YulIdentifier","src":"659:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"647:6:1"},"nodeType":"YulFunctionCall","src":"647:19:1"},"nodeType":"YulExpressionStatement","src":"647:19:1"},{"nodeType":"YulAssignment","src":"675:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"686:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"691:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"682:3:1"},"nodeType":"YulFunctionCall","src":"682:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"675:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"703:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"718:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"722:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"714:3:1"},"nodeType":"YulFunctionCall","src":"714:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"707:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"771:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"780:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"788:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"773:6:1"},"nodeType":"YulFunctionCall","src":"773:22:1"},"nodeType":"YulExpressionStatement","src":"773:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"748:2:1"},{"name":"_4","nodeType":"YulIdentifier","src":"752:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"744:3:1"},"nodeType":"YulFunctionCall","src":"744:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"757:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"740:3:1"},"nodeType":"YulFunctionCall","src":"740:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"762:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"737:2:1"},"nodeType":"YulFunctionCall","src":"737:33:1"},"nodeType":"YulIf","src":"734:2:1"},{"nodeType":"YulVariableDeclaration","src":"806:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"815:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"810:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"879:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"900:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"918:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"905:12:1"},"nodeType":"YulFunctionCall","src":"905:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"893:6:1"},"nodeType":"YulFunctionCall","src":"893:30:1"},"nodeType":"YulExpressionStatement","src":"893:30:1"},{"nodeType":"YulAssignment","src":"936:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"947:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"952:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"943:3:1"},"nodeType":"YulFunctionCall","src":"943:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"936:3:1"}]},{"nodeType":"YulAssignment","src":"968:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"979:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"984:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"975:3:1"},"nodeType":"YulFunctionCall","src":"975:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"968:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"841:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"844:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"838:2:1"},"nodeType":"YulFunctionCall","src":"838:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"852:18:1","statements":[{"nodeType":"YulAssignment","src":"854:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"863:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"866:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"859:3:1"},"nodeType":"YulFunctionCall","src":"859:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"854:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"834:3:1","statements":[]},"src":"830:167:1"},{"nodeType":"YulAssignment","src":"1006:15:1","value":{"name":"dst_1","nodeType":"YulIdentifier","src":"1016:5:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1006:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1013:1"},{"body":{"nodeType":"YulBlock","src":"1133:76:1","statements":[{"nodeType":"YulAssignment","src":"1143:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1155:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1166:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1151:3:1"},"nodeType":"YulFunctionCall","src":"1151:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1143:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1185:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1196:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1178:6:1"},"nodeType":"YulFunctionCall","src":"1178:25:1"},"nodeType":"YulExpressionStatement","src":"1178:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1102:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1113:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1124:4:1","type":""}],"src":"1032:177:1"},{"body":{"nodeType":"YulBlock","src":"1258:198:1","statements":[{"nodeType":"YulAssignment","src":"1268:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1284:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1278:5:1"},"nodeType":"YulFunctionCall","src":"1278:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1268:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1296:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1318:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1326:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1314:3:1"},"nodeType":"YulFunctionCall","src":"1314:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1300:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1406:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"1408:7:1"},"nodeType":"YulFunctionCall","src":"1408:9:1"},"nodeType":"YulExpressionStatement","src":"1408:9:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1349:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1361:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1346:2:1"},"nodeType":"YulFunctionCall","src":"1346:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1385:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1397:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1382:2:1"},"nodeType":"YulFunctionCall","src":"1382:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1343:2:1"},"nodeType":"YulFunctionCall","src":"1343:62:1"},"nodeType":"YulIf","src":"1340:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1435:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1439:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1428:6:1"},"nodeType":"YulFunctionCall","src":"1428:22:1"},"nodeType":"YulExpressionStatement","src":"1428:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1238:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1247:6:1","type":""}],"src":"1214:242:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1458:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:918:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:30:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"489:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"476:12:1"},"nodeType":"YulFunctionCall","src":"476:16:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"466:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"519:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"521:7:1"},"nodeType":"YulFunctionCall","src":"521:9:1"},"nodeType":"YulExpressionStatement","src":"521:9:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"507:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"515:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"504:2:1"},"nodeType":"YulFunctionCall","src":"504:14:1"},"nodeType":"YulIf","src":"501:2:1"},{"nodeType":"YulVariableDeclaration","src":"541:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"555:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"563:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"551:3:1"},"nodeType":"YulFunctionCall","src":"551:15:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"545:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"575:38:1","value":{"arguments":[{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"605:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"609:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"601:3:1"},"nodeType":"YulFunctionCall","src":"601:11:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"586:14:1"},"nodeType":"YulFunctionCall","src":"586:27:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"579:3:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"622:16:1","value":{"name":"dst","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"dst_1","nodeType":"YulTypedName","src":"626:5:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"654:3:1"},{"name":"length","nodeType":"YulIdentifier","src":"659:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"647:6:1"},"nodeType":"YulFunctionCall","src":"647:19:1"},"nodeType":"YulExpressionStatement","src":"647:19:1"},{"nodeType":"YulAssignment","src":"675:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"686:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"691:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"682:3:1"},"nodeType":"YulFunctionCall","src":"682:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"675:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"703:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"718:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"722:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"714:3:1"},"nodeType":"YulFunctionCall","src":"714:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"707:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"771:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"780:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"788:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"773:6:1"},"nodeType":"YulFunctionCall","src":"773:22:1"},"nodeType":"YulExpressionStatement","src":"773:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"748:2:1"},{"name":"_4","nodeType":"YulIdentifier","src":"752:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"744:3:1"},"nodeType":"YulFunctionCall","src":"744:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"757:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"740:3:1"},"nodeType":"YulFunctionCall","src":"740:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"762:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"737:2:1"},"nodeType":"YulFunctionCall","src":"737:33:1"},"nodeType":"YulIf","src":"734:2:1"},{"nodeType":"YulVariableDeclaration","src":"806:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"815:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"810:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"879:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"900:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"918:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"905:12:1"},"nodeType":"YulFunctionCall","src":"905:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"893:6:1"},"nodeType":"YulFunctionCall","src":"893:30:1"},"nodeType":"YulExpressionStatement","src":"893:30:1"},{"nodeType":"YulAssignment","src":"936:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"947:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"952:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"943:3:1"},"nodeType":"YulFunctionCall","src":"943:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"936:3:1"}]},{"nodeType":"YulAssignment","src":"968:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"979:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"984:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"975:3:1"},"nodeType":"YulFunctionCall","src":"975:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"968:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"841:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"844:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"838:2:1"},"nodeType":"YulFunctionCall","src":"838:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"852:18:1","statements":[{"nodeType":"YulAssignment","src":"854:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"863:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"866:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"859:3:1"},"nodeType":"YulFunctionCall","src":"859:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"854:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"834:3:1","statements":[]},"src":"830:167:1"},{"nodeType":"YulAssignment","src":"1006:15:1","value":{"name":"dst_1","nodeType":"YulIdentifier","src":"1016:5:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1006:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1013:1"},{"body":{"nodeType":"YulBlock","src":"1133:76:1","statements":[{"nodeType":"YulAssignment","src":"1143:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1155:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1166:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1151:3:1"},"nodeType":"YulFunctionCall","src":"1151:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1143:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1185:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1196:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1178:6:1"},"nodeType":"YulFunctionCall","src":"1178:25:1"},"nodeType":"YulExpressionStatement","src":"1178:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1102:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1113:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1124:4:1","type":""}],"src":"1032:177:1"},{"body":{"nodeType":"YulBlock","src":"1258:198:1","statements":[{"nodeType":"YulAssignment","src":"1268:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1284:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1278:5:1"},"nodeType":"YulFunctionCall","src":"1278:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1268:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1296:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1318:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1326:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1314:3:1"},"nodeType":"YulFunctionCall","src":"1314:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1300:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1406:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"1408:7:1"},"nodeType":"YulFunctionCall","src":"1408:9:1"},"nodeType":"YulExpressionStatement","src":"1408:9:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1349:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1361:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1346:2:1"},"nodeType":"YulFunctionCall","src":"1346:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1385:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1397:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1382:2:1"},"nodeType":"YulFunctionCall","src":"1382:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1343:2:1"},"nodeType":"YulFunctionCall","src":"1343:62:1"},"nodeType":"YulIf","src":"1340:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1435:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1439:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1428:6:1"},"nodeType":"YulFunctionCall","src":"1428:22:1"},"nodeType":"YulExpressionStatement","src":"1428:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1238:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1247:6:1","type":""}],"src":"1214:242:1"}]},"contents":"{ { } function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 { @@ -39,5 +39,5 @@ if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { invalid() } mstore(64, newFreePtr) } -}","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;130:7:0;;83:59::o;14:1013:1:-;;129:2;172;160:9;151:7;147:23;143:32;140:2;;;193:6;185;178:22;140:2;238:9;225:23;267:18;308:2;300:6;297:14;294:2;;;329:6;321;314:22;294:2;372:6;361:9;357:22;347:32;;417:7;410:4;406:2;402:13;398:27;388:2;;444:6;436;429:22;388:2;489;476:16;515:2;507:6;504:14;501:2;;;521:9;501:2;563;555:6;551:15;541:25;;586:27;609:2;605;601:11;586:27;:::i;:::-;647:19;;;682:12;;;;714:11;;;744;;;740:20;;737:33;-1:-1:-1;734:2:1;;;788:6;780;773:22;734:2;815:6;806:15;;830:167;844:6;841:1;838:13;830:167;;;905:17;;893:30;;866:1;859:9;;;;;943:12;;;;975;;830:167;;;-1:-1:-1;1016:5:1;109:918;-1:-1:-1;;;;;;;;109:918:1:o;1032:177::-;1178:25;;;1166:2;1151:18;;1133:76::o;1214:242::-;1284:2;1278:9;1314:17;;;1361:18;1346:34;;1382:22;;;1343:62;1340:2;;;1408:9;1340:2;1435;1428:22;1258:198;;-1:-1:-1;1258:198:1:o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +}","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;130:7:0;;83:59::o;14:1013:1:-;;129:2;172;160:9;151:7;147:23;143:32;140:2;;;193:6;185;178:22;140:2;238:9;225:23;267:18;308:2;300:6;297:14;294:2;;;329:6;321;314:22;294:2;372:6;361:9;357:22;347:32;;417:7;410:4;406:2;402:13;398:27;388:2;;444:6;436;429:22;388:2;489;476:16;515:2;507:6;504:14;501:2;;;521:9;501:2;563;555:6;551:15;541:25;;586:27;609:2;605;601:11;586:27;:::i;:::-;647:19;;;682:12;;;;714:11;;;744;;;740:20;;737:33;-1:-1:-1;734:2:1;;;788:6;780;773:22;734:2;815:6;806:15;;830:167;844:6;841:1;838:13;830:167;;;905:17;;893:30;;866:1;859:9;;;;;943:12;;;;975;;830:167;;;-1:-1:-1;1016:5:1;109:918;-1:-1:-1;;;;;;;;109:918:1:o;1032:177::-;1178:25;;;1166:2;1151:18;;1133:76::o;1214:242::-;1284:2;1278:9;1314:17;;;1361:18;1346:34;;1382:22;;;1343:62;1340:2;;;1408:9;1340:2;1435;1428:22;1258:198;;-1:-1:-1;1258:198:1:o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_yul/output.json b/test/cmdlineTests/standard_yul/output.json index 3b048f04e..3af4e8bda 100644 --- a/test/cmdlineTests/standard_yul/output.json +++ b/test/cmdlineTests/standard_yul/output.json @@ -14,7 +14,7 @@ sstore /* \"A\":0:42 */ pop -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_object/output.json b/test/cmdlineTests/standard_yul_object/output.json index 4e770527b..4f00c6b3d 100644 --- a/test/cmdlineTests/standard_yul_object/output.json +++ b/test/cmdlineTests/standard_yul_object/output.json @@ -13,7 +13,7 @@ pop stop data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263 -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { code { let x := dataoffset(\"DataName\") sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_object_name/output.json b/test/cmdlineTests/standard_yul_object_name/output.json index e23e4a7af..68f41f342 100644 --- a/test/cmdlineTests/standard_yul_object_name/output.json +++ b/test/cmdlineTests/standard_yul_object_name/output.json @@ -22,7 +22,7 @@ sub_0: assembly { /* \"A\":137:149 */ revert } -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { code { let x := dataoffset(\"DataName\") sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_optimiserSteps/output.json b/test/cmdlineTests/standard_yul_optimiserSteps/output.json index 6a1ac3d40..d5a6d4500 100644 --- a/test/cmdlineTests/standard_yul_optimiserSteps/output.json +++ b/test/cmdlineTests/standard_yul_optimiserSteps/output.json @@ -13,7 +13,7 @@ /* \"A\":20:40 */ sstore pop -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_optimized/output.json b/test/cmdlineTests/standard_yul_optimized/output.json index 962d92a32..6f88a238f 100644 --- a/test/cmdlineTests/standard_yul_optimized/output.json +++ b/test/cmdlineTests/standard_yul_optimized/output.json @@ -5,7 +5,7 @@ mload /* \"A\":20:40 */ sstore -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"bytecode removed","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) From 06ea7c66f7bf0444b3ef33ab3bd9f449c620a7fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 5 Nov 2020 17:57:46 +0100 Subject: [PATCH 04/13] Use consistent style for stuff removed from the output of command-line tests --- test/cmdlineTests.sh | 10 +++++----- .../combined_json_generated_sources/output | 2 +- test/cmdlineTests/dup_opt_peephole/output | 2 +- test/cmdlineTests/optimizer_BlockDeDuplicator/output | 2 +- test/cmdlineTests/optimizer_user_yul/output | 2 +- test/cmdlineTests/output_selection_all_A1/output.json | 2 +- test/cmdlineTests/output_selection_all_A2/output.json | 2 +- .../cmdlineTests/output_selection_all_star/output.json | 2 +- .../output_selection_single_A1/output.json | 2 +- .../output_selection_single_B1/output.json | 2 +- .../output_selection_single_all/output.json | 2 +- .../cmdlineTests/standard_generatedSources/output.json | 4 ++-- .../standard_immutable_references/output.json | 2 +- .../standard_optimizer_generatedSources/output.json | 4 ++-- test/cmdlineTests/standard_yul/output.json | 2 +- test/cmdlineTests/standard_yul_object/output.json | 2 +- test/cmdlineTests/standard_yul_object_name/output.json | 2 +- .../standard_yul_optimiserSteps/output.json | 2 +- test/cmdlineTests/standard_yul_optimized/output.json | 2 +- test/cmdlineTests/yul_unimplemented/err | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index b1b463c7a..57a080764 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -112,8 +112,8 @@ function test_solc_behaviour() sed -i.bak -e 's/{[^{]*Warning: This is a pre-release compiler version[^}]*},\{0,1\}//' "$stdout_path" sed -i.bak -E -e 's/ Consider adding \\"pragma solidity \^[0-9.]*;\\"//g' "$stdout_path" sed -i.bak -e 's/"errors":\[\],\{0,1\}//' "$stdout_path" - sed -i.bak -E -e 's/\"opcodes\":\"[^"]+\"/\"opcodes\":\"opcodes removed\"/g' "$stdout_path" - sed -i.bak -E -e 's/\"sourceMap\":\"[0-9:;-]+\"/\"sourceMap\":\"sourceMap removed\"/g' "$stdout_path" + sed -i.bak -E -e 's/\"opcodes\":\"[^"]+\"/\"opcodes\":\"\"/g' "$stdout_path" + sed -i.bak -E -e 's/\"sourceMap\":\"[0-9:;-]+\"/\"sourceMap\":\"\"/g' "$stdout_path" # Remove bytecode (but not linker references). sed -i.bak -E -e 's/(\"object\":\")[0-9a-f]+([^"]*\")/\1\2/g' "$stdout_path" @@ -126,10 +126,10 @@ function test_solc_behaviour() else sed -i.bak -e '/^Warning: This is a pre-release compiler version, please do not use it in production./d' "$stderr_path" sed -i.bak -e '/^Warning (3805): This is a pre-release compiler version, please do not use it in production./d' "$stderr_path" - sed -i.bak -e 's/\(^[ ]*auxdata: \)0x[0-9a-f]*$/\1AUXDATA REMOVED/' "$stdout_path" + sed -i.bak -e 's/\(^[ ]*auxdata: \)0x[0-9a-f]*$/\1/' "$stdout_path" sed -i.bak -e 's/ Consider adding "pragma .*$//' "$stderr_path" - sed -i.bak -e 's/\(Unimplemented feature error: .* in \).*$/\1FILENAME REMOVED/' "$stderr_path" - sed -i.bak -e 's/"version": "[^"]*"/"version": "VERSION REMOVED"/' "$stdout_path" + sed -i.bak -e 's/\(Unimplemented feature error: .* in \).*$/\1/' "$stderr_path" + sed -i.bak -e 's/"version": "[^"]*"/"version": ""/' "$stdout_path" # Remove bytecode (but not linker references). Since non-JSON output is unstructured, # use metadata markers for detection to have some confidence that it's actually bytecode diff --git a/test/cmdlineTests/combined_json_generated_sources/output b/test/cmdlineTests/combined_json_generated_sources/output index d93c81871..dfe910c12 100644 --- a/test/cmdlineTests/combined_json_generated_sources/output +++ b/test/cmdlineTests/combined_json_generated_sources/output @@ -731,5 +731,5 @@ ] } }, - "version": "VERSION REMOVED" + "version": "" } diff --git a/test/cmdlineTests/dup_opt_peephole/output b/test/cmdlineTests/dup_opt_peephole/output index 020260c2b..fec862428 100644 --- a/test/cmdlineTests/dup_opt_peephole/output +++ b/test/cmdlineTests/dup_opt_peephole/output @@ -50,5 +50,5 @@ sub_0: assembly { /* "dup_opt_peephole/input.sol":0:111 contract C {... */ stop - auxdata: AUXDATA REMOVED + auxdata: } diff --git a/test/cmdlineTests/optimizer_BlockDeDuplicator/output b/test/cmdlineTests/optimizer_BlockDeDuplicator/output index e5c45e53e..3af48a2f0 100644 --- a/test/cmdlineTests/optimizer_BlockDeDuplicator/output +++ b/test/cmdlineTests/optimizer_BlockDeDuplicator/output @@ -87,5 +87,5 @@ sub_0: assembly { tag_7: jump // out - auxdata: AUXDATA REMOVED + auxdata: } diff --git a/test/cmdlineTests/optimizer_user_yul/output b/test/cmdlineTests/optimizer_user_yul/output index 9a4301aa4..f6e7705c7 100644 --- a/test/cmdlineTests/optimizer_user_yul/output +++ b/test/cmdlineTests/optimizer_user_yul/output @@ -83,5 +83,5 @@ sub_0: assembly { dup1 revert - auxdata: AUXDATA REMOVED + auxdata: } diff --git a/test/cmdlineTests/output_selection_all_A1/output.json b/test/cmdlineTests/output_selection_all_A1/output.json index 0d661af09..64c0d4e30 100644 --- a/test/cmdlineTests/output_selection_all_A1/output.json +++ b/test/cmdlineTests/output_selection_all_A1/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_all_A2/output.json b/test/cmdlineTests/output_selection_all_A2/output.json index 9b76f80f5..29c7ba76d 100644 --- a/test/cmdlineTests/output_selection_all_A2/output.json +++ b/test/cmdlineTests/output_selection_all_A2/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_all_star/output.json b/test/cmdlineTests/output_selection_all_star/output.json index 6b22fa6fc..07a6641a5 100644 --- a/test/cmdlineTests/output_selection_all_star/output.json +++ b/test/cmdlineTests/output_selection_all_star/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}},"b.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}},"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } diff --git a/test/cmdlineTests/output_selection_single_A1/output.json b/test/cmdlineTests/output_selection_single_A1/output.json index 96bd230d3..837fd36cd 100644 --- a/test/cmdlineTests/output_selection_single_A1/output.json +++ b/test/cmdlineTests/output_selection_single_A1/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/output_selection_single_B1/output.json b/test/cmdlineTests/output_selection_single_B1/output.json index ed96ca767..9ba08193e 100644 --- a/test/cmdlineTests/output_selection_single_B1/output.json +++ b/test/cmdlineTests/output_selection_single_B1/output.json @@ -1,4 +1,4 @@ -{"contracts":{"b.sol":{"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"b.sol":{"B2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"b.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"b.sol","start":-1},"type":"Warning"},{"component":"general","errorCode":"2018","formattedMessage":"b.sol:2:15: Warning: Function state mutability can be restricted to pure contract A1 { function b(uint x) public { assert(x > 0); } } contract B2 { function b(uint x) public pure { assert(x > 0); } } ^------------------------------------------^ diff --git a/test/cmdlineTests/output_selection_single_all/output.json b/test/cmdlineTests/output_selection_single_all/output.json index da4cf0c17..c0a48b617 100644 --- a/test/cmdlineTests/output_selection_single_all/output.json +++ b/test/cmdlineTests/output_selection_single_all/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A1":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}},"A2":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0},"b.sol":{"id":1}}} diff --git a/test/cmdlineTests/standard_generatedSources/output.json b/test/cmdlineTests/standard_generatedSources/output.json index 98764ff11..c154f364c 100644 --- a/test/cmdlineTests/standard_generatedSources/output.json +++ b/test/cmdlineTests/standard_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2555:1","statements":[{"body":{"nodeType":"YulBlock","src":"101:684:1","statements":[{"body":{"nodeType":"YulBlock","src":"150:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"159:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"162:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"152:6:1"},"nodeType":"YulFunctionCall","src":"152:12:1"},"nodeType":"YulExpressionStatement","src":"152:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"129:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"137:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"125:3:1"},"nodeType":"YulFunctionCall","src":"125:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"144:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"121:3:1"},"nodeType":"YulFunctionCall","src":"121:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"114:6:1"},"nodeType":"YulFunctionCall","src":"114:35:1"},"nodeType":"YulIf","src":"111:2:1"},{"nodeType":"YulVariableDeclaration","src":"175:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"202:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"189:12:1"},"nodeType":"YulFunctionCall","src":"189:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"179:6:1","type":""}]},{"nodeType":"YulAssignment","src":"218:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"299:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"242:56:1"},"nodeType":"YulFunctionCall","src":"242:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"227:14:1"},"nodeType":"YulFunctionCall","src":"227:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"218:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"316:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"327:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"320:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"348:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"341:6:1"},"nodeType":"YulFunctionCall","src":"341:21:1"},"nodeType":"YulExpressionStatement","src":"341:21:1"},{"nodeType":"YulAssignment","src":"363:27:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"377:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"385:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"373:3:1"},"nodeType":"YulFunctionCall","src":"373:17:1"},"variableNames":[{"name":"offset","nodeType":"YulIdentifier","src":"363:6:1"}]},{"nodeType":"YulAssignment","src":"391:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"402:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"407:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"391:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"452:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"463:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"456:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"518:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"527:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"530:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"520:6:1"},"nodeType":"YulFunctionCall","src":"520:12:1"},"nodeType":"YulExpressionStatement","src":"520:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"488:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"497:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"505:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"493:3:1"},"nodeType":"YulFunctionCall","src":"493:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"484:3:1"},"nodeType":"YulFunctionCall","src":"484:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"513:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"481:2:1"},"nodeType":"YulFunctionCall","src":"481:36:1"},"nodeType":"YulIf","src":"478:2:1"},{"body":{"nodeType":"YulBlock","src":"603:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"617:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"621:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"658:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"684:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"696:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"663:20:1"},"nodeType":"YulFunctionCall","src":"663:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"651:6:1"},"nodeType":"YulFunctionCall","src":"651:50:1"},"nodeType":"YulExpressionStatement","src":"651:50:1"},{"nodeType":"YulAssignment","src":"714:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"725:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"730:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"721:3:1"},"nodeType":"YulFunctionCall","src":"721:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"714:3:1"}]},{"nodeType":"YulAssignment","src":"748:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"759:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"764:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"755:3:1"},"nodeType":"YulFunctionCall","src":"755:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"748:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"565:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"568:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"562:2:1"},"nodeType":"YulFunctionCall","src":"562:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"576:18:1","statements":[{"nodeType":"YulAssignment","src":"578:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"587:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"590:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"583:3:1"},"nodeType":"YulFunctionCall","src":"583:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"578:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"547:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"549:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"558:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"553:1:1","type":""}]}]},"src":"543:236:1"}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"79:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"87:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"95:5:1","type":""}],"src":"24:761:1"},{"body":{"nodeType":"YulBlock","src":"843:87:1","statements":[{"nodeType":"YulAssignment","src":"853:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"875:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"862:12:1"},"nodeType":"YulFunctionCall","src":"862:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"853:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"918:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"891:26:1"},"nodeType":"YulFunctionCall","src":"891:33:1"},"nodeType":"YulExpressionStatement","src":"891:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"821:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"829:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"837:5:1","type":""}],"src":"791:139:1"},{"body":{"nodeType":"YulBlock","src":"1027:312:1","statements":[{"body":{"nodeType":"YulBlock","src":"1073:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1082:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1085:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1075:6:1"},"nodeType":"YulFunctionCall","src":"1075:12:1"},"nodeType":"YulExpressionStatement","src":"1075:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1048:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1057:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1044:3:1"},"nodeType":"YulFunctionCall","src":"1044:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1069:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1040:3:1"},"nodeType":"YulFunctionCall","src":"1040:32:1"},"nodeType":"YulIf","src":"1037:2:1"},{"nodeType":"YulBlock","src":"1099:233:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1113:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1144:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1155:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1140:3:1"},"nodeType":"YulFunctionCall","src":"1140:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1127:12:1"},"nodeType":"YulFunctionCall","src":"1127:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1117:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1205:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1214:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1217:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1207:6:1"},"nodeType":"YulFunctionCall","src":"1207:12:1"},"nodeType":"YulExpressionStatement","src":"1207:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1177:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1185:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1174:2:1"},"nodeType":"YulFunctionCall","src":"1174:30:1"},"nodeType":"YulIf","src":"1171:2:1"},{"nodeType":"YulAssignment","src":"1234:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1294:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1305:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1290:3:1"},"nodeType":"YulFunctionCall","src":"1290:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1314:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1244:45:1"},"nodeType":"YulFunctionCall","src":"1244:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1234:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"997:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1008:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1020:6:1","type":""}],"src":"936:403:1"},{"body":{"nodeType":"YulBlock","src":"1410:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1427:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1450:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1432:17:1"},"nodeType":"YulFunctionCall","src":"1432:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1420:6:1"},"nodeType":"YulFunctionCall","src":"1420:37:1"},"nodeType":"YulExpressionStatement","src":"1420:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1398:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1405:3:1","type":""}],"src":"1345:118:1"},{"body":{"nodeType":"YulBlock","src":"1567:124:1","statements":[{"nodeType":"YulAssignment","src":"1577:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1589:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1600:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1585:3:1"},"nodeType":"YulFunctionCall","src":"1585:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1577:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1657:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1670:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1681:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1666:3:1"},"nodeType":"YulFunctionCall","src":"1666:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1613:43:1"},"nodeType":"YulFunctionCall","src":"1613:71:1"},"nodeType":"YulExpressionStatement","src":"1613:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1539:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1551:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1562:4:1","type":""}],"src":"1469:222:1"},{"body":{"nodeType":"YulBlock","src":"1737:238:1","statements":[{"nodeType":"YulAssignment","src":"1747:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1763:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1757:5:1"},"nodeType":"YulFunctionCall","src":"1757:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1747:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1775:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1797:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1805:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1793:3:1"},"nodeType":"YulFunctionCall","src":"1793:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1779:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1921:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"1923:11:1"},"nodeType":"YulFunctionCall","src":"1923:13:1"},"nodeType":"YulExpressionStatement","src":"1923:13:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1864:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1876:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1861:2:1"},"nodeType":"YulFunctionCall","src":"1861:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1900:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1912:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1897:2:1"},"nodeType":"YulFunctionCall","src":"1897:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1858:2:1"},"nodeType":"YulFunctionCall","src":"1858:62:1"},"nodeType":"YulIf","src":"1855:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1954:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1958:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1947:6:1"},"nodeType":"YulFunctionCall","src":"1947:22:1"},"nodeType":"YulExpressionStatement","src":"1947:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1721:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1730:6:1","type":""}],"src":"1697:278:1"},{"body":{"nodeType":"YulBlock","src":"2063:224:1","statements":[{"body":{"nodeType":"YulBlock","src":"2168:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"2170:11:1"},"nodeType":"YulFunctionCall","src":"2170:13:1"},"nodeType":"YulExpressionStatement","src":"2170:13:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2140:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2148:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2137:2:1"},"nodeType":"YulFunctionCall","src":"2137:30:1"},"nodeType":"YulIf","src":"2134:2:1"},{"nodeType":"YulAssignment","src":"2195:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2207:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2215:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2203:3:1"},"nodeType":"YulFunctionCall","src":"2203:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2195:4:1"}]},{"nodeType":"YulAssignment","src":"2257:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2269:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2275:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2265:3:1"},"nodeType":"YulFunctionCall","src":"2265:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2257:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2047:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2058:4:1","type":""}],"src":"1981:306:1"},{"body":{"nodeType":"YulBlock","src":"2338:32:1","statements":[{"nodeType":"YulAssignment","src":"2348:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2359:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2348:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2320:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2330:7:1","type":""}],"src":"2293:77:1"},{"body":{"nodeType":"YulBlock","src":"2399:25:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"2409:7:1"},"nodeType":"YulFunctionCall","src":"2409:9:1"},"nodeType":"YulExpressionStatement","src":"2409:9:1"}]},"name":"panic_error","nodeType":"YulFunctionDefinition","src":"2376:48:1"},{"body":{"nodeType":"YulBlock","src":"2473:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2530:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2539:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2542:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2532:6:1"},"nodeType":"YulFunctionCall","src":"2532:12:1"},"nodeType":"YulExpressionStatement","src":"2532:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2496:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2521:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2503:17:1"},"nodeType":"YulFunctionCall","src":"2503:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2493:2:1"},"nodeType":"YulFunctionCall","src":"2493:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2486:6:1"},"nodeType":"YulFunctionCall","src":"2486:43:1"},"nodeType":"YulIf","src":"2483:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2466:5:1","type":""}],"src":"2430:122:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:2555:1","statements":[{"body":{"nodeType":"YulBlock","src":"101:684:1","statements":[{"body":{"nodeType":"YulBlock","src":"150:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"159:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"162:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"152:6:1"},"nodeType":"YulFunctionCall","src":"152:12:1"},"nodeType":"YulExpressionStatement","src":"152:12:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"129:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"137:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"125:3:1"},"nodeType":"YulFunctionCall","src":"125:17:1"},{"name":"end","nodeType":"YulIdentifier","src":"144:3:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"121:3:1"},"nodeType":"YulFunctionCall","src":"121:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"114:6:1"},"nodeType":"YulFunctionCall","src":"114:35:1"},"nodeType":"YulIf","src":"111:2:1"},{"nodeType":"YulVariableDeclaration","src":"175:34:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"202:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"189:12:1"},"nodeType":"YulFunctionCall","src":"189:20:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"179:6:1","type":""}]},{"nodeType":"YulAssignment","src":"218:89:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"299:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"242:56:1"},"nodeType":"YulFunctionCall","src":"242:64:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"227:14:1"},"nodeType":"YulFunctionCall","src":"227:80:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"218:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"316:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"327:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"320:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"348:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"355:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"341:6:1"},"nodeType":"YulFunctionCall","src":"341:21:1"},"nodeType":"YulExpressionStatement","src":"341:21:1"},{"nodeType":"YulAssignment","src":"363:27:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"377:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"385:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"373:3:1"},"nodeType":"YulFunctionCall","src":"373:17:1"},"variableNames":[{"name":"offset","nodeType":"YulIdentifier","src":"363:6:1"}]},{"nodeType":"YulAssignment","src":"391:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"402:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"407:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"391:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"452:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"463:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"456:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"518:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"527:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"530:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"520:6:1"},"nodeType":"YulFunctionCall","src":"520:12:1"},"nodeType":"YulExpressionStatement","src":"520:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"488:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"497:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"505:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"493:3:1"},"nodeType":"YulFunctionCall","src":"493:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"484:3:1"},"nodeType":"YulFunctionCall","src":"484:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"513:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"481:2:1"},"nodeType":"YulFunctionCall","src":"481:36:1"},"nodeType":"YulIf","src":"478:2:1"},{"body":{"nodeType":"YulBlock","src":"603:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"617:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"621:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"658:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"684:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"696:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"663:20:1"},"nodeType":"YulFunctionCall","src":"663:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"651:6:1"},"nodeType":"YulFunctionCall","src":"651:50:1"},"nodeType":"YulExpressionStatement","src":"651:50:1"},{"nodeType":"YulAssignment","src":"714:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"725:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"730:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"721:3:1"},"nodeType":"YulFunctionCall","src":"721:14:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"714:3:1"}]},{"nodeType":"YulAssignment","src":"748:21:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"759:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"764:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"755:3:1"},"nodeType":"YulFunctionCall","src":"755:14:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"748:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"565:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"568:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"562:2:1"},"nodeType":"YulFunctionCall","src":"562:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"576:18:1","statements":[{"nodeType":"YulAssignment","src":"578:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"587:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"590:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"583:3:1"},"nodeType":"YulFunctionCall","src":"583:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"578:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"547:14:1","statements":[{"nodeType":"YulVariableDeclaration","src":"549:10:1","value":{"kind":"number","nodeType":"YulLiteral","src":"558:1:1","type":"","value":"0"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"553:1:1","type":""}]}]},"src":"543:236:1"}]},"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"79:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"87:3:1","type":""}],"returnVariables":[{"name":"array","nodeType":"YulTypedName","src":"95:5:1","type":""}],"src":"24:761:1"},{"body":{"nodeType":"YulBlock","src":"843:87:1","statements":[{"nodeType":"YulAssignment","src":"853:29:1","value":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"875:6:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"862:12:1"},"nodeType":"YulFunctionCall","src":"862:20:1"},"variableNames":[{"name":"value","nodeType":"YulIdentifier","src":"853:5:1"}]},{"expression":{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"918:5:1"}],"functionName":{"name":"validator_revert_t_uint256","nodeType":"YulIdentifier","src":"891:26:1"},"nodeType":"YulFunctionCall","src":"891:33:1"},"nodeType":"YulExpressionStatement","src":"891:33:1"}]},"name":"abi_decode_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"offset","nodeType":"YulTypedName","src":"821:6:1","type":""},{"name":"end","nodeType":"YulTypedName","src":"829:3:1","type":""}],"returnVariables":[{"name":"value","nodeType":"YulTypedName","src":"837:5:1","type":""}],"src":"791:139:1"},{"body":{"nodeType":"YulBlock","src":"1027:312:1","statements":[{"body":{"nodeType":"YulBlock","src":"1073:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1082:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1085:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1075:6:1"},"nodeType":"YulFunctionCall","src":"1075:12:1"},"nodeType":"YulExpressionStatement","src":"1075:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"1048:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"1057:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"1044:3:1"},"nodeType":"YulFunctionCall","src":"1044:23:1"},{"kind":"number","nodeType":"YulLiteral","src":"1069:2:1","type":"","value":"32"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"1040:3:1"},"nodeType":"YulFunctionCall","src":"1040:32:1"},"nodeType":"YulIf","src":"1037:2:1"},{"nodeType":"YulBlock","src":"1099:233:1","statements":[{"nodeType":"YulVariableDeclaration","src":"1113:45:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1144:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1155:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1140:3:1"},"nodeType":"YulFunctionCall","src":"1140:17:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"1127:12:1"},"nodeType":"YulFunctionCall","src":"1127:31:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"1117:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1205:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1214:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"1217:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"1207:6:1"},"nodeType":"YulFunctionCall","src":"1207:12:1"},"nodeType":"YulExpressionStatement","src":"1207:12:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"1177:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"1185:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1174:2:1"},"nodeType":"YulFunctionCall","src":"1174:30:1"},"nodeType":"YulIf","src":"1171:2:1"},{"nodeType":"YulAssignment","src":"1234:88:1","value":{"arguments":[{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1294:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"1305:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1290:3:1"},"nodeType":"YulFunctionCall","src":"1290:22:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"1314:7:1"}],"functionName":{"name":"abi_decode_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"1244:45:1"},"nodeType":"YulFunctionCall","src":"1244:78:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1234:6:1"}]}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"997:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"1008:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"1020:6:1","type":""}],"src":"936:403:1"},{"body":{"nodeType":"YulBlock","src":"1410:53:1","statements":[{"expression":{"arguments":[{"name":"pos","nodeType":"YulIdentifier","src":"1427:3:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"1450:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"1432:17:1"},"nodeType":"YulFunctionCall","src":"1432:24:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1420:6:1"},"nodeType":"YulFunctionCall","src":"1420:37:1"},"nodeType":"YulExpressionStatement","src":"1420:37:1"}]},"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"1398:5:1","type":""},{"name":"pos","nodeType":"YulTypedName","src":"1405:3:1","type":""}],"src":"1345:118:1"},{"body":{"nodeType":"YulBlock","src":"1567:124:1","statements":[{"nodeType":"YulAssignment","src":"1577:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1589:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1600:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1585:3:1"},"nodeType":"YulFunctionCall","src":"1585:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1577:4:1"}]},{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"1657:6:1"},{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1670:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1681:1:1","type":"","value":"0"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1666:3:1"},"nodeType":"YulFunctionCall","src":"1666:17:1"}],"functionName":{"name":"abi_encode_t_uint256_to_t_uint256_fromStack","nodeType":"YulIdentifier","src":"1613:43:1"},"nodeType":"YulFunctionCall","src":"1613:71:1"},"nodeType":"YulExpressionStatement","src":"1613:71:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1539:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1551:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1562:4:1","type":""}],"src":"1469:222:1"},{"body":{"nodeType":"YulBlock","src":"1737:238:1","statements":[{"nodeType":"YulAssignment","src":"1747:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1763:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1757:5:1"},"nodeType":"YulFunctionCall","src":"1757:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1747:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1775:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1797:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1805:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1793:3:1"},"nodeType":"YulFunctionCall","src":"1793:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1779:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1921:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"1923:11:1"},"nodeType":"YulFunctionCall","src":"1923:13:1"},"nodeType":"YulExpressionStatement","src":"1923:13:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1864:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1876:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1861:2:1"},"nodeType":"YulFunctionCall","src":"1861:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1900:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1912:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1897:2:1"},"nodeType":"YulFunctionCall","src":"1897:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1858:2:1"},"nodeType":"YulFunctionCall","src":"1858:62:1"},"nodeType":"YulIf","src":"1855:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1954:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1958:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1947:6:1"},"nodeType":"YulFunctionCall","src":"1947:22:1"},"nodeType":"YulExpressionStatement","src":"1947:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1721:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1730:6:1","type":""}],"src":"1697:278:1"},{"body":{"nodeType":"YulBlock","src":"2063:224:1","statements":[{"body":{"nodeType":"YulBlock","src":"2168:17:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"panic_error","nodeType":"YulIdentifier","src":"2170:11:1"},"nodeType":"YulFunctionCall","src":"2170:13:1"},"nodeType":"YulExpressionStatement","src":"2170:13:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2140:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2148:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"2137:2:1"},"nodeType":"YulFunctionCall","src":"2137:30:1"},"nodeType":"YulIf","src":"2134:2:1"},{"nodeType":"YulAssignment","src":"2195:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"2207:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"2215:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"2203:3:1"},"nodeType":"YulFunctionCall","src":"2203:17:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2195:4:1"}]},{"nodeType":"YulAssignment","src":"2257:23:1","value":{"arguments":[{"name":"size","nodeType":"YulIdentifier","src":"2269:4:1"},{"kind":"number","nodeType":"YulLiteral","src":"2275:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"2265:3:1"},"nodeType":"YulFunctionCall","src":"2265:15:1"},"variableNames":[{"name":"size","nodeType":"YulIdentifier","src":"2257:4:1"}]}]},"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"length","nodeType":"YulTypedName","src":"2047:6:1","type":""}],"returnVariables":[{"name":"size","nodeType":"YulTypedName","src":"2058:4:1","type":""}],"src":"1981:306:1"},{"body":{"nodeType":"YulBlock","src":"2338:32:1","statements":[{"nodeType":"YulAssignment","src":"2348:16:1","value":{"name":"value","nodeType":"YulIdentifier","src":"2359:5:1"},"variableNames":[{"name":"cleaned","nodeType":"YulIdentifier","src":"2348:7:1"}]}]},"name":"cleanup_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2320:5:1","type":""}],"returnVariables":[{"name":"cleaned","nodeType":"YulTypedName","src":"2330:7:1","type":""}],"src":"2293:77:1"},{"body":{"nodeType":"YulBlock","src":"2399:25:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"2409:7:1"},"nodeType":"YulFunctionCall","src":"2409:9:1"},"nodeType":"YulExpressionStatement","src":"2409:9:1"}]},"name":"panic_error","nodeType":"YulFunctionDefinition","src":"2376:48:1"},{"body":{"nodeType":"YulBlock","src":"2473:79:1","statements":[{"body":{"nodeType":"YulBlock","src":"2530:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"2539:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"2542:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"2532:6:1"},"nodeType":"YulFunctionCall","src":"2532:12:1"},"nodeType":"YulExpressionStatement","src":"2532:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2496:5:1"},{"arguments":[{"name":"value","nodeType":"YulIdentifier","src":"2521:5:1"}],"functionName":{"name":"cleanup_t_uint256","nodeType":"YulIdentifier","src":"2503:17:1"},"nodeType":"YulFunctionCall","src":"2503:24:1"}],"functionName":{"name":"eq","nodeType":"YulIdentifier","src":"2493:2:1"},"nodeType":"YulFunctionCall","src":"2493:35:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"2486:6:1"},"nodeType":"YulFunctionCall","src":"2486:43:1"},"nodeType":"YulIf","src":"2483:2:1"}]},"name":"validator_revert_t_uint256","nodeType":"YulFunctionDefinition","parameters":[{"name":"value","nodeType":"YulTypedName","src":"2466:5:1","type":""}],"src":"2430:122:1"}]},"contents":"{ // uint256[] function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array { @@ -77,5 +77,5 @@ } } -","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;130:7;83:59;;;:::o;24:761:1:-;;144:3;137:4;129:6;125:17;121:27;111:2;;162:1;159;152:12;111:2;202:6;189:20;227:80;242:64;299:6;242:64;:::i;:::-;227:80;:::i;:::-;218:89;;327:5;355:6;348:5;341:21;385:4;377:6;373:17;363:27;;407:4;402:3;398:14;391:21;;463:6;513:3;505:4;497:6;493:17;488:3;484:27;481:36;478:2;;;530:1;527;520:12;478:2;558:1;543:236;568:6;565:1;562:13;543:236;;;635:3;663:37;696:3;684:10;663:37;:::i;:::-;658:3;651:50;730:4;725:3;721:14;714:21;;764:4;759:3;755:14;748:21;;603:176;590:1;587;583:9;578:14;;543:236;;;547:14;101:684;;;;;;;:::o;791:139::-;;875:6;862:20;853:29;;891:33;918:5;891:33;:::i;:::-;843:87;;;;:::o;936:403::-;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;1085:1;1082;1075:12;1037:2;1155:1;1144:9;1140:17;1127:31;1185:18;1177:6;1174:30;1171:2;;;1217:1;1214;1207:12;1171:2;1244:78;1314:7;1305:6;1294:9;1290:22;1244:78;:::i;:::-;1234:88;;1099:233;1027:312;;;;:::o;1345:118::-;1432:24;1450:5;1432:24;:::i;:::-;1427:3;1420:37;1410:53;;:::o;1469:222::-;;1600:2;1589:9;1585:18;1577:26;;1613:71;1681:1;1670:9;1666:17;1657:6;1613:71;:::i;:::-;1567:124;;;;:::o;1697:278::-;;1763:2;1757:9;1747:19;;1805:4;1797:6;1793:17;1912:6;1900:10;1897:22;1876:18;1864:10;1861:34;1858:62;1855:2;;;1923:13;;:::i;:::-;1855:2;1958:10;1954:2;1947:22;1737:238;;;;:::o;1981:306::-;;2148:18;2140:6;2137:30;2134:2;;;2170:13;;:::i;:::-;2134:2;2215:4;2207:6;2203:17;2195:25;;2275:4;2269;2265:15;2257:23;;2063:224;;;:::o;2293:77::-;;2359:5;2348:16;;2338:32;;;:::o;2376:48::-;2409:9;2430:122;2503:24;2521:5;2503:24;:::i;:::-;2496:5;2493:35;2483:2;;2542:1;2539;2532:12;2483:2;2473:79;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;130:7;83:59;;;:::o;24:761:1:-;;144:3;137:4;129:6;125:17;121:27;111:2;;162:1;159;152:12;111:2;202:6;189:20;227:80;242:64;299:6;242:64;:::i;:::-;227:80;:::i;:::-;218:89;;327:5;355:6;348:5;341:21;385:4;377:6;373:17;363:27;;407:4;402:3;398:14;391:21;;463:6;513:3;505:4;497:6;493:17;488:3;484:27;481:36;478:2;;;530:1;527;520:12;478:2;558:1;543:236;568:6;565:1;562:13;543:236;;;635:3;663:37;696:3;684:10;663:37;:::i;:::-;658:3;651:50;730:4;725:3;721:14;714:21;;764:4;759:3;755:14;748:21;;603:176;590:1;587;583:9;578:14;;543:236;;;547:14;101:684;;;;;;;:::o;791:139::-;;875:6;862:20;853:29;;891:33;918:5;891:33;:::i;:::-;843:87;;;;:::o;936:403::-;;1069:2;1057:9;1048:7;1044:23;1040:32;1037:2;;;1085:1;1082;1075:12;1037:2;1155:1;1144:9;1140:17;1127:31;1185:18;1177:6;1174:30;1171:2;;;1217:1;1214;1207:12;1171:2;1244:78;1314:7;1305:6;1294:9;1290:22;1244:78;:::i;:::-;1234:88;;1099:233;1027:312;;;;:::o;1345:118::-;1432:24;1450:5;1432:24;:::i;:::-;1427:3;1420:37;1410:53;;:::o;1469:222::-;;1600:2;1589:9;1585:18;1577:26;;1613:71;1681:1;1670:9;1666:17;1657:6;1613:71;:::i;:::-;1567:124;;;;:::o;1697:278::-;;1763:2;1757:9;1747:19;;1805:4;1797:6;1793:17;1912:6;1900:10;1897:22;1876:18;1864:10;1861:34;1858:62;1855:2;;;1923:13;;:::i;:::-;1855:2;1958:10;1954:2;1947:22;1737:238;;;;:::o;1981:306::-;;2148:18;2140:6;2137:30;2134:2;;;2170:13;;:::i;:::-;2134:2;2215:4;2207:6;2203:17;2195:25;;2275:4;2269;2265:15;2257:23;;2063:224;;;:::o;2293:77::-;;2359:5;2348:16;;2338:32;;;:::o;2376:48::-;2409:9;2430:122;2503:24;2521:5;2503:24;:::i;:::-;2496:5;2493:35;2483:2;;2542:1;2539;2532:12;2483:2;2473:79;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_immutable_references/output.json b/test/cmdlineTests/standard_immutable_references/output.json index e3a98b198..25537229f 100644 --- a/test/cmdlineTests/standard_immutable_references/output.json +++ b/test/cmdlineTests/standard_immutable_references/output.json @@ -1,2 +1,2 @@ -{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"generatedSources":[],"immutableReferences":{"3":[{"length":32,"start":77}]},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"36:96:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;108:7;126:1;119:8;;74:56;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +{"contracts":{"a.sol":{"A":{"evm":{"deployedBytecode":{"generatedSources":[],"immutableReferences":{"3":[{"length":32,"start":77}]},"linkReferences":{},"object":"","opcodes":"","sourceMap":"36:96:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:56;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;108:7;126:1;119:8;;74:56;:::o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_optimizer_generatedSources/output.json b/test/cmdlineTests/standard_optimizer_generatedSources/output.json index aef6f86b1..de9cccc84 100644 --- a/test/cmdlineTests/standard_optimizer_generatedSources/output.json +++ b/test/cmdlineTests/standard_optimizer_generatedSources/output.json @@ -1,4 +1,4 @@ -{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1458:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:918:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:30:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"489:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"476:12:1"},"nodeType":"YulFunctionCall","src":"476:16:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"466:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"519:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"521:7:1"},"nodeType":"YulFunctionCall","src":"521:9:1"},"nodeType":"YulExpressionStatement","src":"521:9:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"507:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"515:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"504:2:1"},"nodeType":"YulFunctionCall","src":"504:14:1"},"nodeType":"YulIf","src":"501:2:1"},{"nodeType":"YulVariableDeclaration","src":"541:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"555:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"563:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"551:3:1"},"nodeType":"YulFunctionCall","src":"551:15:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"545:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"575:38:1","value":{"arguments":[{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"605:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"609:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"601:3:1"},"nodeType":"YulFunctionCall","src":"601:11:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"586:14:1"},"nodeType":"YulFunctionCall","src":"586:27:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"579:3:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"622:16:1","value":{"name":"dst","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"dst_1","nodeType":"YulTypedName","src":"626:5:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"654:3:1"},{"name":"length","nodeType":"YulIdentifier","src":"659:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"647:6:1"},"nodeType":"YulFunctionCall","src":"647:19:1"},"nodeType":"YulExpressionStatement","src":"647:19:1"},{"nodeType":"YulAssignment","src":"675:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"686:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"691:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"682:3:1"},"nodeType":"YulFunctionCall","src":"682:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"675:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"703:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"718:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"722:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"714:3:1"},"nodeType":"YulFunctionCall","src":"714:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"707:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"771:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"780:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"788:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"773:6:1"},"nodeType":"YulFunctionCall","src":"773:22:1"},"nodeType":"YulExpressionStatement","src":"773:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"748:2:1"},{"name":"_4","nodeType":"YulIdentifier","src":"752:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"744:3:1"},"nodeType":"YulFunctionCall","src":"744:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"757:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"740:3:1"},"nodeType":"YulFunctionCall","src":"740:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"762:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"737:2:1"},"nodeType":"YulFunctionCall","src":"737:33:1"},"nodeType":"YulIf","src":"734:2:1"},{"nodeType":"YulVariableDeclaration","src":"806:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"815:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"810:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"879:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"900:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"918:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"905:12:1"},"nodeType":"YulFunctionCall","src":"905:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"893:6:1"},"nodeType":"YulFunctionCall","src":"893:30:1"},"nodeType":"YulExpressionStatement","src":"893:30:1"},{"nodeType":"YulAssignment","src":"936:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"947:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"952:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"943:3:1"},"nodeType":"YulFunctionCall","src":"943:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"936:3:1"}]},{"nodeType":"YulAssignment","src":"968:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"979:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"984:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"975:3:1"},"nodeType":"YulFunctionCall","src":"975:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"968:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"841:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"844:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"838:2:1"},"nodeType":"YulFunctionCall","src":"838:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"852:18:1","statements":[{"nodeType":"YulAssignment","src":"854:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"863:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"866:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"859:3:1"},"nodeType":"YulFunctionCall","src":"859:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"854:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"834:3:1","statements":[]},"src":"830:167:1"},{"nodeType":"YulAssignment","src":"1006:15:1","value":{"name":"dst_1","nodeType":"YulIdentifier","src":"1016:5:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1006:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1013:1"},{"body":{"nodeType":"YulBlock","src":"1133:76:1","statements":[{"nodeType":"YulAssignment","src":"1143:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1155:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1166:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1151:3:1"},"nodeType":"YulFunctionCall","src":"1151:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1143:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1185:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1196:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1178:6:1"},"nodeType":"YulFunctionCall","src":"1178:25:1"},"nodeType":"YulExpressionStatement","src":"1178:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1102:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1113:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1124:4:1","type":""}],"src":"1032:177:1"},{"body":{"nodeType":"YulBlock","src":"1258:198:1","statements":[{"nodeType":"YulAssignment","src":"1268:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1284:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1278:5:1"},"nodeType":"YulFunctionCall","src":"1278:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1268:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1296:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1318:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1326:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1314:3:1"},"nodeType":"YulFunctionCall","src":"1314:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1300:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1406:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"1408:7:1"},"nodeType":"YulFunctionCall","src":"1408:9:1"},"nodeType":"YulExpressionStatement","src":"1408:9:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1349:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1361:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1346:2:1"},"nodeType":"YulFunctionCall","src":"1346:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1385:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1397:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1382:2:1"},"nodeType":"YulFunctionCall","src":"1382:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1343:2:1"},"nodeType":"YulFunctionCall","src":"1343:62:1"},"nodeType":"YulIf","src":"1340:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1435:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1439:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1428:6:1"},"nodeType":"YulFunctionCall","src":"1428:22:1"},"nodeType":"YulExpressionStatement","src":"1428:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1238:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1247:6:1","type":""}],"src":"1214:242:1"}]},"contents":"{ +{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:1458:1","statements":[{"nodeType":"YulBlock","src":"6:3:1","statements":[]},{"body":{"nodeType":"YulBlock","src":"109:918:1","statements":[{"nodeType":"YulVariableDeclaration","src":"119:12:1","value":{"kind":"number","nodeType":"YulLiteral","src":"129:2:1","type":"","value":"32"},"variables":[{"name":"_1","nodeType":"YulTypedName","src":"123:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"176:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"185:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"193:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"178:6:1"},"nodeType":"YulFunctionCall","src":"178:22:1"},"nodeType":"YulExpressionStatement","src":"178:22:1"}]},"condition":{"arguments":[{"arguments":[{"name":"dataEnd","nodeType":"YulIdentifier","src":"151:7:1"},{"name":"headStart","nodeType":"YulIdentifier","src":"160:9:1"}],"functionName":{"name":"sub","nodeType":"YulIdentifier","src":"147:3:1"},"nodeType":"YulFunctionCall","src":"147:23:1"},{"name":"_1","nodeType":"YulIdentifier","src":"172:2:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"143:3:1"},"nodeType":"YulFunctionCall","src":"143:32:1"},"nodeType":"YulIf","src":"140:2:1"},{"nodeType":"YulVariableDeclaration","src":"211:37:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"238:9:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"225:12:1"},"nodeType":"YulFunctionCall","src":"225:23:1"},"variables":[{"name":"offset","nodeType":"YulTypedName","src":"215:6:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"257:28:1","value":{"kind":"number","nodeType":"YulLiteral","src":"267:18:1","type":"","value":"0xffffffffffffffff"},"variables":[{"name":"_2","nodeType":"YulTypedName","src":"261:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"312:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"321:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"329:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"314:6:1"},"nodeType":"YulFunctionCall","src":"314:22:1"},"nodeType":"YulExpressionStatement","src":"314:22:1"}]},"condition":{"arguments":[{"name":"offset","nodeType":"YulIdentifier","src":"300:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"308:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"297:2:1"},"nodeType":"YulFunctionCall","src":"297:14:1"},"nodeType":"YulIf","src":"294:2:1"},{"nodeType":"YulVariableDeclaration","src":"347:32:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"361:9:1"},{"name":"offset","nodeType":"YulIdentifier","src":"372:6:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"357:3:1"},"nodeType":"YulFunctionCall","src":"357:22:1"},"variables":[{"name":"_3","nodeType":"YulTypedName","src":"351:2:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"427:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"436:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"444:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"429:6:1"},"nodeType":"YulFunctionCall","src":"429:22:1"},"nodeType":"YulExpressionStatement","src":"429:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"406:2:1"},{"kind":"number","nodeType":"YulLiteral","src":"410:4:1","type":"","value":"0x1f"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"402:3:1"},"nodeType":"YulFunctionCall","src":"402:13:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"417:7:1"}],"functionName":{"name":"slt","nodeType":"YulIdentifier","src":"398:3:1"},"nodeType":"YulFunctionCall","src":"398:27:1"}],"functionName":{"name":"iszero","nodeType":"YulIdentifier","src":"391:6:1"},"nodeType":"YulFunctionCall","src":"391:35:1"},"nodeType":"YulIf","src":"388:2:1"},{"nodeType":"YulVariableDeclaration","src":"462:30:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"489:2:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"476:12:1"},"nodeType":"YulFunctionCall","src":"476:16:1"},"variables":[{"name":"length","nodeType":"YulTypedName","src":"466:6:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"519:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"521:7:1"},"nodeType":"YulFunctionCall","src":"521:9:1"},"nodeType":"YulExpressionStatement","src":"521:9:1"}]},"condition":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"507:6:1"},{"name":"_2","nodeType":"YulIdentifier","src":"515:2:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"504:2:1"},"nodeType":"YulFunctionCall","src":"504:14:1"},"nodeType":"YulIf","src":"501:2:1"},{"nodeType":"YulVariableDeclaration","src":"541:25:1","value":{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"555:6:1"},{"name":"_1","nodeType":"YulIdentifier","src":"563:2:1"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"551:3:1"},"nodeType":"YulFunctionCall","src":"551:15:1"},"variables":[{"name":"_4","nodeType":"YulTypedName","src":"545:2:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"575:38:1","value":{"arguments":[{"arguments":[{"name":"_4","nodeType":"YulIdentifier","src":"605:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"609:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"601:3:1"},"nodeType":"YulFunctionCall","src":"601:11:1"}],"functionName":{"name":"allocateMemory","nodeType":"YulIdentifier","src":"586:14:1"},"nodeType":"YulFunctionCall","src":"586:27:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"579:3:1","type":""}]},{"nodeType":"YulVariableDeclaration","src":"622:16:1","value":{"name":"dst","nodeType":"YulIdentifier","src":"635:3:1"},"variables":[{"name":"dst_1","nodeType":"YulTypedName","src":"626:5:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"654:3:1"},{"name":"length","nodeType":"YulIdentifier","src":"659:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"647:6:1"},"nodeType":"YulFunctionCall","src":"647:19:1"},"nodeType":"YulExpressionStatement","src":"647:19:1"},{"nodeType":"YulAssignment","src":"675:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"686:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"691:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"682:3:1"},"nodeType":"YulFunctionCall","src":"682:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"675:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"703:22:1","value":{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"718:2:1"},{"name":"_1","nodeType":"YulIdentifier","src":"722:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"714:3:1"},"nodeType":"YulFunctionCall","src":"714:11:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"707:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"771:26:1","statements":[{"expression":{"arguments":[{"name":"value0","nodeType":"YulIdentifier","src":"780:6:1"},{"name":"value0","nodeType":"YulIdentifier","src":"788:6:1"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"773:6:1"},"nodeType":"YulFunctionCall","src":"773:22:1"},"nodeType":"YulExpressionStatement","src":"773:22:1"}]},"condition":{"arguments":[{"arguments":[{"arguments":[{"name":"_3","nodeType":"YulIdentifier","src":"748:2:1"},{"name":"_4","nodeType":"YulIdentifier","src":"752:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"744:3:1"},"nodeType":"YulFunctionCall","src":"744:11:1"},{"name":"_1","nodeType":"YulIdentifier","src":"757:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"740:3:1"},"nodeType":"YulFunctionCall","src":"740:20:1"},{"name":"dataEnd","nodeType":"YulIdentifier","src":"762:7:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"737:2:1"},"nodeType":"YulFunctionCall","src":"737:33:1"},"nodeType":"YulIf","src":"734:2:1"},{"nodeType":"YulVariableDeclaration","src":"806:15:1","value":{"name":"value0","nodeType":"YulIdentifier","src":"815:6:1"},"variables":[{"name":"i","nodeType":"YulTypedName","src":"810:1:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"879:118:1","statements":[{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"900:3:1"},{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"918:3:1"}],"functionName":{"name":"calldataload","nodeType":"YulIdentifier","src":"905:12:1"},"nodeType":"YulFunctionCall","src":"905:17:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"893:6:1"},"nodeType":"YulFunctionCall","src":"893:30:1"},"nodeType":"YulExpressionStatement","src":"893:30:1"},{"nodeType":"YulAssignment","src":"936:19:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"947:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"952:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"943:3:1"},"nodeType":"YulFunctionCall","src":"943:12:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"936:3:1"}]},{"nodeType":"YulAssignment","src":"968:19:1","value":{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"979:3:1"},{"name":"_1","nodeType":"YulIdentifier","src":"984:2:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"975:3:1"},"nodeType":"YulFunctionCall","src":"975:12:1"},"variableNames":[{"name":"src","nodeType":"YulIdentifier","src":"968:3:1"}]}]},"condition":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"841:1:1"},{"name":"length","nodeType":"YulIdentifier","src":"844:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"838:2:1"},"nodeType":"YulFunctionCall","src":"838:13:1"},"nodeType":"YulForLoop","post":{"nodeType":"YulBlock","src":"852:18:1","statements":[{"nodeType":"YulAssignment","src":"854:14:1","value":{"arguments":[{"name":"i","nodeType":"YulIdentifier","src":"863:1:1"},{"kind":"number","nodeType":"YulLiteral","src":"866:1:1","type":"","value":"1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"859:3:1"},"nodeType":"YulFunctionCall","src":"859:9:1"},"variableNames":[{"name":"i","nodeType":"YulIdentifier","src":"854:1:1"}]}]},"pre":{"nodeType":"YulBlock","src":"834:3:1","statements":[]},"src":"830:167:1"},{"nodeType":"YulAssignment","src":"1006:15:1","value":{"name":"dst_1","nodeType":"YulIdentifier","src":"1016:5:1"},"variableNames":[{"name":"value0","nodeType":"YulIdentifier","src":"1006:6:1"}]}]},"name":"abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"75:9:1","type":""},{"name":"dataEnd","nodeType":"YulTypedName","src":"86:7:1","type":""}],"returnVariables":[{"name":"value0","nodeType":"YulTypedName","src":"98:6:1","type":""}],"src":"14:1013:1"},{"body":{"nodeType":"YulBlock","src":"1133:76:1","statements":[{"nodeType":"YulAssignment","src":"1143:26:1","value":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1155:9:1"},{"kind":"number","nodeType":"YulLiteral","src":"1166:2:1","type":"","value":"32"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1151:3:1"},"nodeType":"YulFunctionCall","src":"1151:18:1"},"variableNames":[{"name":"tail","nodeType":"YulIdentifier","src":"1143:4:1"}]},{"expression":{"arguments":[{"name":"headStart","nodeType":"YulIdentifier","src":"1185:9:1"},{"name":"value0","nodeType":"YulIdentifier","src":"1196:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1178:6:1"},"nodeType":"YulFunctionCall","src":"1178:25:1"},"nodeType":"YulExpressionStatement","src":"1178:25:1"}]},"name":"abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed","nodeType":"YulFunctionDefinition","parameters":[{"name":"headStart","nodeType":"YulTypedName","src":"1102:9:1","type":""},{"name":"value0","nodeType":"YulTypedName","src":"1113:6:1","type":""}],"returnVariables":[{"name":"tail","nodeType":"YulTypedName","src":"1124:4:1","type":""}],"src":"1032:177:1"},{"body":{"nodeType":"YulBlock","src":"1258:198:1","statements":[{"nodeType":"YulAssignment","src":"1268:19:1","value":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1284:2:1","type":"","value":"64"}],"functionName":{"name":"mload","nodeType":"YulIdentifier","src":"1278:5:1"},"nodeType":"YulFunctionCall","src":"1278:9:1"},"variableNames":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1268:6:1"}]},{"nodeType":"YulVariableDeclaration","src":"1296:35:1","value":{"arguments":[{"name":"memPtr","nodeType":"YulIdentifier","src":"1318:6:1"},{"name":"size","nodeType":"YulIdentifier","src":"1326:4:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"1314:3:1"},"nodeType":"YulFunctionCall","src":"1314:17:1"},"variables":[{"name":"newFreePtr","nodeType":"YulTypedName","src":"1300:10:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"1406:13:1","statements":[{"expression":{"arguments":[],"functionName":{"name":"invalid","nodeType":"YulIdentifier","src":"1408:7:1"},"nodeType":"YulFunctionCall","src":"1408:9:1"},"nodeType":"YulExpressionStatement","src":"1408:9:1"}]},"condition":{"arguments":[{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1349:10:1"},{"kind":"number","nodeType":"YulLiteral","src":"1361:18:1","type":"","value":"0xffffffffffffffff"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"1346:2:1"},"nodeType":"YulFunctionCall","src":"1346:34:1"},{"arguments":[{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1385:10:1"},{"name":"memPtr","nodeType":"YulIdentifier","src":"1397:6:1"}],"functionName":{"name":"lt","nodeType":"YulIdentifier","src":"1382:2:1"},"nodeType":"YulFunctionCall","src":"1382:22:1"}],"functionName":{"name":"or","nodeType":"YulIdentifier","src":"1343:2:1"},"nodeType":"YulFunctionCall","src":"1343:62:1"},"nodeType":"YulIf","src":"1340:2:1"},{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"1435:2:1","type":"","value":"64"},{"name":"newFreePtr","nodeType":"YulIdentifier","src":"1439:10:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"1428:6:1"},"nodeType":"YulFunctionCall","src":"1428:22:1"},"nodeType":"YulExpressionStatement","src":"1428:22:1"}]},"name":"allocateMemory","nodeType":"YulFunctionDefinition","parameters":[{"name":"size","nodeType":"YulTypedName","src":"1238:4:1","type":""}],"returnVariables":[{"name":"memPtr","nodeType":"YulTypedName","src":"1247:6:1","type":""}],"src":"1214:242:1"}]},"contents":"{ { } function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 { @@ -39,5 +39,5 @@ if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { invalid() } mstore(64, newFreePtr) } -}","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;130:7:0;;83:59::o;14:1013:1:-;;129:2;172;160:9;151:7;147:23;143:32;140:2;;;193:6;185;178:22;140:2;238:9;225:23;267:18;308:2;300:6;297:14;294:2;;;329:6;321;314:22;294:2;372:6;361:9;357:22;347:32;;417:7;410:4;406:2;402:13;398:27;388:2;;444:6;436;429:22;388:2;489;476:16;515:2;507:6;504:14;501:2;;;521:9;501:2;563;555:6;551:15;541:25;;586:27;609:2;605;601:11;586:27;:::i;:::-;647:19;;;682:12;;;;714:11;;;744;;;740:20;;737:33;-1:-1:-1;734:2:1;;;788:6;780;773:22;734:2;815:6;806:15;;830:167;844:6;841:1;838:13;830:167;;;905:17;;893:30;;866:1;859:9;;;;;943:12;;;;975;;830:167;;;-1:-1:-1;1016:5:1;109:918;-1:-1:-1;;;;;;;;109:918:1:o;1032:177::-;1178:25;;;1166:2;1151:18;;1133:76::o;1214:242::-;1284:2;1278:9;1314:17;;;1361:18;1346:34;;1382:22;;;1343:62;1340:2;;;1408:9;1340:2;1435;1428:22;1258:198;;-1:-1:-1;1258:198:1:o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! +}","id":1,"language":"Yul","name":"#utility.yul"}],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"","sourceMap":"70:74:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:59;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;130:7:0;;83:59::o;14:1013:1:-;;129:2;172;160:9;151:7;147:23;143:32;140:2;;;193:6;185;178:22;140:2;238:9;225:23;267:18;308:2;300:6;297:14;294:2;;;329:6;321;314:22;294:2;372:6;361:9;357:22;347:32;;417:7;410:4;406:2;402:13;398:27;388:2;;444:6;436;429:22;388:2;489;476:16;515:2;507:6;504:14;501:2;;;521:9;501:2;563;555:6;551:15;541:25;;586:27;609:2;605;601:11;586:27;:::i;:::-;647:19;;;682:12;;;;714:11;;;744;;;740:20;;737:33;-1:-1:-1;734:2:1;;;788:6;780;773:22;734:2;815:6;806:15;;830:167;844:6;841:1;838:13;830:167;;;905:17;;893:30;;866:1;859:9;;;;;943:12;;;;975;;830:167;;;-1:-1:-1;1016:5:1;109:918;-1:-1:-1;;;;;;;;109:918:1:o;1032:177::-;1178:25;;;1166:2;1151:18;;1133:76::o;1214:242::-;1284:2;1278:9;1314:17;;;1361:18;1346:34;;1382:22;;;1343:62;1340:2;;;1408:9;1340:2;1435;1428:22;1258:198;;-1:-1:-1;1258:198:1:o"}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"a.sol: Warning: Source file does not specify required compiler version! ","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}} diff --git a/test/cmdlineTests/standard_yul/output.json b/test/cmdlineTests/standard_yul/output.json index 3af4e8bda..e6c6e1390 100644 --- a/test/cmdlineTests/standard_yul/output.json +++ b/test/cmdlineTests/standard_yul/output.json @@ -14,7 +14,7 @@ sstore /* \"A\":0:42 */ pop -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_object/output.json b/test/cmdlineTests/standard_yul_object/output.json index 4f00c6b3d..d4dcb7acd 100644 --- a/test/cmdlineTests/standard_yul_object/output.json +++ b/test/cmdlineTests/standard_yul_object/output.json @@ -13,7 +13,7 @@ pop stop data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263 -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"object \"NamedObject\" { code { let x := dataoffset(\"DataName\") sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_object_name/output.json b/test/cmdlineTests/standard_yul_object_name/output.json index 68f41f342..0abd732e4 100644 --- a/test/cmdlineTests/standard_yul_object_name/output.json +++ b/test/cmdlineTests/standard_yul_object_name/output.json @@ -22,7 +22,7 @@ sub_0: assembly { /* \"A\":137:149 */ revert } -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"},"deployedBytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"NamedObject\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""},"deployedBytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"object \"NamedObject\" { code { let x := dataoffset(\"DataName\") sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_optimiserSteps/output.json b/test/cmdlineTests/standard_yul_optimiserSteps/output.json index d5a6d4500..536ee0047 100644 --- a/test/cmdlineTests/standard_yul_optimiserSteps/output.json +++ b/test/cmdlineTests/standard_yul_optimiserSteps/output.json @@ -13,7 +13,7 @@ /* \"A\":20:40 */ sstore pop -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/standard_yul_optimized/output.json b/test/cmdlineTests/standard_yul_optimized/output.json index 6f88a238f..758904e93 100644 --- a/test/cmdlineTests/standard_yul_optimized/output.json +++ b/test/cmdlineTests/standard_yul_optimized/output.json @@ -5,7 +5,7 @@ mload /* \"A\":20:40 */ sstore -","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"opcodes removed","sourceMap":"sourceMap removed"}},"ir":"object \"object\" { +","bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"object \"object\" { code { let x := mload(0) sstore(add(x, 0), 0) diff --git a/test/cmdlineTests/yul_unimplemented/err b/test/cmdlineTests/yul_unimplemented/err index d4b9fe68d..908cf4411 100644 --- a/test/cmdlineTests/yul_unimplemented/err +++ b/test/cmdlineTests/yul_unimplemented/err @@ -1,4 +1,4 @@ -Error (1834): Unimplemented feature error: Copying from storage to storage is not yet implemented. in FILENAME REMOVED +Error (1834): Unimplemented feature error: Copying from storage to storage is not yet implemented. in --> yul_unimplemented/input.sol:7:9: | 7 | a = b; From a0d22422b03f3a19f3a0326c6f4becd73802953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 4 Nov 2020 19:25:51 +0100 Subject: [PATCH 05/13] Command-line tests for linking in Solidity mode --- test/cmdlineTests/linking_solidity/args | 1 + test/cmdlineTests/linking_solidity/input.sol | 12 ++++++ test/cmdlineTests/linking_solidity/output | 12 ++++++ .../args | 1 + .../input.sol | 20 +++++++++ .../output | 24 +++++++++++ .../linking_standard_solidity/input.json | 33 +++++++++++++++ .../linking_standard_solidity/output.json | 1 + .../input.json | 33 +++++++++++++++ .../output.json | 1 + .../input.json | 41 +++++++++++++++++++ .../output.json | 1 + 12 files changed, 180 insertions(+) create mode 100644 test/cmdlineTests/linking_solidity/args create mode 100644 test/cmdlineTests/linking_solidity/input.sol create mode 100644 test/cmdlineTests/linking_solidity/output create mode 100644 test/cmdlineTests/linking_solidity_unresolved_references/args create mode 100644 test/cmdlineTests/linking_solidity_unresolved_references/input.sol create mode 100644 test/cmdlineTests/linking_solidity_unresolved_references/output create mode 100644 test/cmdlineTests/linking_standard_solidity/input.json create mode 100644 test/cmdlineTests/linking_standard_solidity/output.json create mode 100644 test/cmdlineTests/linking_standard_solidity_quote_in_file_name/input.json create mode 100644 test/cmdlineTests/linking_standard_solidity_quote_in_file_name/output.json create mode 100644 test/cmdlineTests/linking_standard_solidity_unresolved_references/input.json create mode 100644 test/cmdlineTests/linking_standard_solidity_unresolved_references/output.json diff --git a/test/cmdlineTests/linking_solidity/args b/test/cmdlineTests/linking_solidity/args new file mode 100644 index 000000000..0b04ebd47 --- /dev/null +++ b/test/cmdlineTests/linking_solidity/args @@ -0,0 +1 @@ +--bin --bin-runtime --libraries linking_solidity/input.sol:L:0x1234567890123456789012345678901234567890 diff --git a/test/cmdlineTests/linking_solidity/input.sol b/test/cmdlineTests/linking_solidity/input.sol new file mode 100644 index 000000000..eb06631bb --- /dev/null +++ b/test/cmdlineTests/linking_solidity/input.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.0; + +library L { + function f() external {} +} + +contract C { + function foo() public { + L.f(); + } +} diff --git a/test/cmdlineTests/linking_solidity/output b/test/cmdlineTests/linking_solidity/output new file mode 100644 index 000000000..307b131b5 --- /dev/null +++ b/test/cmdlineTests/linking_solidity/output @@ -0,0 +1,12 @@ + +======= linking_solidity/input.sol:C ======= +Binary: + +Binary of the runtime part: + + +======= linking_solidity/input.sol:L ======= +Binary: + +Binary of the runtime part: + diff --git a/test/cmdlineTests/linking_solidity_unresolved_references/args b/test/cmdlineTests/linking_solidity_unresolved_references/args new file mode 100644 index 000000000..a08ce1cb4 --- /dev/null +++ b/test/cmdlineTests/linking_solidity_unresolved_references/args @@ -0,0 +1 @@ +--bin --bin-runtime --libraries linking_solidity_unresolved_references/input.sol:L1:0x1234567890123456789012345678901234567890 diff --git a/test/cmdlineTests/linking_solidity_unresolved_references/input.sol b/test/cmdlineTests/linking_solidity_unresolved_references/input.sol new file mode 100644 index 000000000..2a5f67305 --- /dev/null +++ b/test/cmdlineTests/linking_solidity_unresolved_references/input.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.0; + +library L1 { + function f() external {} +} + +library L2 { + function f() external {} +} + +contract C { + function foo() public { + L1.f(); + L2.f(); + L1.f(); + L2.f(); + L1.f(); + } +} diff --git a/test/cmdlineTests/linking_solidity_unresolved_references/output b/test/cmdlineTests/linking_solidity_unresolved_references/output new file mode 100644 index 000000000..f42191f51 --- /dev/null +++ b/test/cmdlineTests/linking_solidity_unresolved_references/output @@ -0,0 +1,24 @@ + +======= linking_solidity_unresolved_references/input.sol:C ======= +Binary: +__$8ef13d1c56d5343bf69cf9444272079aa5$____$8ef13d1c56d5343bf69cf9444272079aa5$__ + +// $8ef13d1c56d5343bf69cf9444272079aa5$ -> linking_solidity_unresolved_references/input.sol:L2 +// $8ef13d1c56d5343bf69cf9444272079aa5$ -> linking_solidity_unresolved_references/input.sol:L2 +Binary of the runtime part: +__$8ef13d1c56d5343bf69cf9444272079aa5$____$8ef13d1c56d5343bf69cf9444272079aa5$__ + +// $8ef13d1c56d5343bf69cf9444272079aa5$ -> linking_solidity_unresolved_references/input.sol:L2 +// $8ef13d1c56d5343bf69cf9444272079aa5$ -> linking_solidity_unresolved_references/input.sol:L2 + +======= linking_solidity_unresolved_references/input.sol:L1 ======= +Binary: + +Binary of the runtime part: + + +======= linking_solidity_unresolved_references/input.sol:L2 ======= +Binary: + +Binary of the runtime part: + diff --git a/test/cmdlineTests/linking_standard_solidity/input.json b/test/cmdlineTests/linking_standard_solidity/input.json new file mode 100644 index 000000000..b70481304 --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity/input.json @@ -0,0 +1,33 @@ +{ + "language": "Solidity", + "sources": { + "A": { + "content": " + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.0; + + library L { + function f() external {} + } + + contract C { + function foo() public { + L.f(); + } + } + " + } + }, + "settings": { + "libraries": { + "contract/test.sol": { + "L": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "C": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_solidity/output.json b/test/cmdlineTests/linking_standard_solidity/output.json new file mode 100644 index 000000000..1cfa37405 --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity/output.json @@ -0,0 +1 @@ +{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"sources":{"A":{"id":0}}} diff --git a/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/input.json b/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/input.json new file mode 100644 index 000000000..fc54cdabc --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/input.json @@ -0,0 +1,33 @@ +{ + "language": "Solidity", + "sources": { + "A": { + "content": " + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.0; + + library L { + function f() external {} + } + + contract C { + function foo() public { + L.f(); + } + } + " + } + }, + "settings": { + "libraries": { + "contract/test\"test.sol": { + "L": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "C": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/output.json b/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/output.json new file mode 100644 index 000000000..1cfa37405 --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity_quote_in_file_name/output.json @@ -0,0 +1 @@ +{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"sources":{"A":{"id":0}}} diff --git a/test/cmdlineTests/linking_standard_solidity_unresolved_references/input.json b/test/cmdlineTests/linking_standard_solidity_unresolved_references/input.json new file mode 100644 index 000000000..597e7f96e --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity_unresolved_references/input.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "A": { + "content": " + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.0; + + library L1 { + function f() external {} + } + + library L2 { + function f() external {} + } + + contract C { + function foo() public { + L1.f(); + L2.f(); + L1.f(); + L2.f(); + L1.f(); + } + } + " + } + }, + "settings": { + "libraries": { + "contract/test.sol": { + "L1": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "C": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_solidity_unresolved_references/output.json b/test/cmdlineTests/linking_standard_solidity_unresolved_references/output.json new file mode 100644 index 000000000..620ca820e --- /dev/null +++ b/test/cmdlineTests/linking_standard_solidity_unresolved_references/output.json @@ -0,0 +1 @@ +{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{"A":{"L2":[{"length":20,"start":184},{"length":20,"start":368}]}},"object":"__$622b2f540b6a16ff5db7bea656ad8fcf4f$____$622b2f540b6a16ff5db7bea656ad8fcf4f$__","opcodes":"","sourceMap":""}}}}},"sources":{"A":{"id":0}}} From 6ef1e4cfd4817b6f11e39b13a1216a74024f7204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Wed, 4 Nov 2020 19:26:40 +0100 Subject: [PATCH 06/13] Command-line tests for linking in assembly mode --- .../linking_standard_yul/input.json | 20 +++++++++++++++++ .../linking_standard_yul/output.json | 1 + .../cmdlineTests/linking_strict_assembly/args | 1 + test/cmdlineTests/linking_strict_assembly/err | 1 + .../linking_strict_assembly/input.yul | 5 +++++ .../linking_strict_assembly/output | 18 +++++++++++++++ .../args | 1 + .../err | 1 + .../input.yul | 6 +++++ .../output | 22 +++++++++++++++++++ 10 files changed, 76 insertions(+) create mode 100644 test/cmdlineTests/linking_standard_yul/input.json create mode 100644 test/cmdlineTests/linking_standard_yul/output.json create mode 100644 test/cmdlineTests/linking_strict_assembly/args create mode 100644 test/cmdlineTests/linking_strict_assembly/err create mode 100644 test/cmdlineTests/linking_strict_assembly/input.yul create mode 100644 test/cmdlineTests/linking_strict_assembly/output create mode 100644 test/cmdlineTests/linking_strict_assembly_unresolved_references/args create mode 100644 test/cmdlineTests/linking_strict_assembly_unresolved_references/err create mode 100644 test/cmdlineTests/linking_strict_assembly_unresolved_references/input.yul create mode 100644 test/cmdlineTests/linking_strict_assembly_unresolved_references/output diff --git a/test/cmdlineTests/linking_standard_yul/input.json b/test/cmdlineTests/linking_standard_yul/input.json new file mode 100644 index 000000000..3825a1b12 --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul/input.json @@ -0,0 +1,20 @@ +{ + "language": "Yul", + "sources": { + "A": { + "content": "object \"a\" { code { let addr := linkersymbol(\"contract/test.sol:L\") } }" + } + }, + "settings": { + "libraries": { + "contract/test.sol": { + "L": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "*": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_yul/output.json b/test/cmdlineTests/linking_standard_yul/output.json new file mode 100644 index 000000000..23681d9ef --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul/output.json @@ -0,0 +1 @@ +{"errors":[{"component":"general","formattedMessage":"Field \"settings.libraries\" cannot be used for Yul.","message":"Field \"settings.libraries\" cannot be used for Yul.","severity":"error","type":"JSONError"}]} diff --git a/test/cmdlineTests/linking_strict_assembly/args b/test/cmdlineTests/linking_strict_assembly/args new file mode 100644 index 000000000..7a735d327 --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly/args @@ -0,0 +1 @@ +--strict-assembly --libraries contract/test.sol:L:0x1234567890123456789012345678901234567890 diff --git a/test/cmdlineTests/linking_strict_assembly/err b/test/cmdlineTests/linking_strict_assembly/err new file mode 100644 index 000000000..014a1178f --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly/err @@ -0,0 +1 @@ +Warning: Yul is still experimental. Please use the output with care. diff --git a/test/cmdlineTests/linking_strict_assembly/input.yul b/test/cmdlineTests/linking_strict_assembly/input.yul new file mode 100644 index 000000000..be2052771 --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly/input.yul @@ -0,0 +1,5 @@ +object "a" { + code { + let addr := linkersymbol("contract/test.sol:L") + } +} diff --git a/test/cmdlineTests/linking_strict_assembly/output b/test/cmdlineTests/linking_strict_assembly/output new file mode 100644 index 000000000..f232b606b --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly/output @@ -0,0 +1,18 @@ + +======= linking_strict_assembly/input.yul (EVM) ======= + +Pretty printed source: +object "a" { + code { + let addr := linkersymbol("contract/test.sol:L") + } +} + + +Binary representation: +73__$f919ba91ac99f96129544b80b9516b27a8$__50 + +Text representation: + linkerSymbol("f919ba91ac99f96129544b80b9516b27a80e376b9dc693819d0b18b7e0395612") + /* "linking_strict_assembly/input.yul":22:85 */ + pop diff --git a/test/cmdlineTests/linking_strict_assembly_unresolved_references/args b/test/cmdlineTests/linking_strict_assembly_unresolved_references/args new file mode 100644 index 000000000..30b97f0a7 --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly_unresolved_references/args @@ -0,0 +1 @@ +--strict-assembly --libraries contract/test.sol:L1:0x1234567890123456789012345678901234567890 diff --git a/test/cmdlineTests/linking_strict_assembly_unresolved_references/err b/test/cmdlineTests/linking_strict_assembly_unresolved_references/err new file mode 100644 index 000000000..014a1178f --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly_unresolved_references/err @@ -0,0 +1 @@ +Warning: Yul is still experimental. Please use the output with care. diff --git a/test/cmdlineTests/linking_strict_assembly_unresolved_references/input.yul b/test/cmdlineTests/linking_strict_assembly_unresolved_references/input.yul new file mode 100644 index 000000000..b64cc4bae --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly_unresolved_references/input.yul @@ -0,0 +1,6 @@ +object "a" { + code { + let addr1 := linkersymbol("contract/test.sol:L1") + let addr2 := linkersymbol("contract/test.sol:L2") + } +} diff --git a/test/cmdlineTests/linking_strict_assembly_unresolved_references/output b/test/cmdlineTests/linking_strict_assembly_unresolved_references/output new file mode 100644 index 000000000..759fceacf --- /dev/null +++ b/test/cmdlineTests/linking_strict_assembly_unresolved_references/output @@ -0,0 +1,22 @@ + +======= linking_strict_assembly_unresolved_references/input.yul (EVM) ======= + +Pretty printed source: +object "a" { + code { + let addr1 := linkersymbol("contract/test.sol:L1") + let addr2 := linkersymbol("contract/test.sol:L2") + } +} + + +Binary representation: +__$05b0326038374a21e0895480a58bda0768$____$fb58009a6b1ecea3b9d99bedd645df4ec3$__5050 + +Text representation: + linkerSymbol("05b0326038374a21e0895480a58bda0768cdcc04c8d18f154362d1ca5223d245") + /* "linking_strict_assembly_unresolved_references/input.yul":32:81 */ + linkerSymbol("fb58009a6b1ecea3b9d99bedd645df4ec308f17bc0087e5f39d078f77f809177") + /* "linking_strict_assembly_unresolved_references/input.yul":22:145 */ + pop + pop From df8e182b464c95f900e2ce189e791707b6cbefe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 5 Nov 2020 14:40:51 +0100 Subject: [PATCH 07/13] Link binaries produced in assembly mode --- Changelog.md | 1 + libsolidity/interface/StandardCompiler.cpp | 7 +++++-- solc/CommandLineInterface.cpp | 1 + .../linking_standard_yul/output.json | 2 +- .../input.json | 20 +++++++++++++++++++ .../output.json | 1 + .../input.json | 20 +++++++++++++++++++ .../output.json | 1 + .../linking_strict_assembly/output | 2 +- .../output | 2 +- .../SolidityExecutionFramework.cpp | 1 + 11 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 test/cmdlineTests/linking_standard_yul_quote_in_file_name/input.json create mode 100644 test/cmdlineTests/linking_standard_yul_quote_in_file_name/output.json create mode 100644 test/cmdlineTests/linking_standard_yul_unresolved_references/input.json create mode 100644 test/cmdlineTests/linking_standard_yul_unresolved_references/output.json diff --git a/Changelog.md b/Changelog.md index 3b801c1c9..281dac079 100644 --- a/Changelog.md +++ b/Changelog.md @@ -8,6 +8,7 @@ Compiler Features: * SMTChecker: Support ``selector`` for expressions with value known at compile-time. * Command Line Interface: New option ``--model-checker-timeout`` sets a timeout in milliseconds for each individual query performed by the SMTChecker. * Standard JSON: New option ``modelCheckerSettings.timeout`` sets a timeout in milliseconds for each individual query performed by the SMTChecker. + * Assembler: Perform linking in assembly mode when library addresses are provided. Bugfixes: diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 3b4ef56c5..fa51a5761 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -1180,8 +1180,6 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings) return formatFatalError("JSONError", "Yul mode does not support smtlib2responses."); if (!_inputsAndSettings.remappings.empty()) return formatFatalError("JSONError", "Field \"settings.remappings\" cannot be used for Yul."); - if (!_inputsAndSettings.libraries.empty()) - return formatFatalError("JSONError", "Field \"settings.libraries\" cannot be used for Yul."); if (_inputsAndSettings.revertStrings != RevertStrings::Default) return formatFatalError("JSONError", "Field \"settings.debug.revertStrings\" cannot be used for Yul."); @@ -1234,6 +1232,11 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings) MachineAssemblyObject runtimeObject; tie(object, runtimeObject) = stack.assembleAndGuessRuntime(); + if (object.bytecode) + object.bytecode->link(_inputsAndSettings.libraries); + if (runtimeObject.bytecode) + runtimeObject.bytecode->link(_inputsAndSettings.libraries); + for (string const& objectKind: vector{"bytecode", "deployedBytecode"}) if (isArtifactRequested( _inputsAndSettings.outputSelection, diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 1d8e24b7e..48f6ec9da 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -1895,6 +1895,7 @@ bool CommandLineInterface::assemble( try { object = stack.assemble(_targetMachine); + object.bytecode->link(m_libraries); } catch (Exception const& _exception) { diff --git a/test/cmdlineTests/linking_standard_yul/output.json b/test/cmdlineTests/linking_standard_yul/output.json index 23681d9ef..ec391c66c 100644 --- a/test/cmdlineTests/linking_standard_yul/output.json +++ b/test/cmdlineTests/linking_standard_yul/output.json @@ -1 +1 @@ -{"errors":[{"component":"general","formattedMessage":"Field \"settings.libraries\" cannot be used for Yul.","message":"Field \"settings.libraries\" cannot be used for Yul.","severity":"error","type":"JSONError"}]} +{"contracts":{"A":{"a":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]} diff --git a/test/cmdlineTests/linking_standard_yul_quote_in_file_name/input.json b/test/cmdlineTests/linking_standard_yul_quote_in_file_name/input.json new file mode 100644 index 000000000..24fe9d61a --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul_quote_in_file_name/input.json @@ -0,0 +1,20 @@ +{ + "language": "Yul", + "sources": { + "A": { + "content": "object \"a\" { code { let addr := linkersymbol(\"contract/test\\\".sol:L\") } }" + } + }, + "settings": { + "libraries": { + "contract/test\".sol": { + "L": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "*": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_yul_quote_in_file_name/output.json b/test/cmdlineTests/linking_standard_yul_quote_in_file_name/output.json new file mode 100644 index 000000000..ec391c66c --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul_quote_in_file_name/output.json @@ -0,0 +1 @@ +{"contracts":{"A":{"a":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]} diff --git a/test/cmdlineTests/linking_standard_yul_unresolved_references/input.json b/test/cmdlineTests/linking_standard_yul_unresolved_references/input.json new file mode 100644 index 000000000..39f0f7c3a --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul_unresolved_references/input.json @@ -0,0 +1,20 @@ +{ + "language": "Yul", + "sources": { + "A": { + "content": "object \"a\" { code { let addr1 := linkersymbol(\"contract/test.sol:L1\") let addr2 := linkersymbol(\"contract/test.sol:L2\") } }" + } + }, + "settings": { + "libraries": { + "contract/test.sol": { + "L1": "0x1234567890123456789012345678901234567890" + } + }, + "outputSelection": { + "*": { + "*": ["evm.bytecode.object", "evm.bytecode.linkReferences"] + } + } + } +} diff --git a/test/cmdlineTests/linking_standard_yul_unresolved_references/output.json b/test/cmdlineTests/linking_standard_yul_unresolved_references/output.json new file mode 100644 index 000000000..a79a5a1cc --- /dev/null +++ b/test/cmdlineTests/linking_standard_yul_unresolved_references/output.json @@ -0,0 +1 @@ +{"contracts":{"A":{"a":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{"contract/test.sol":{"L2":[{"length":20,"start":22}]}},"object":"__$fb58009a6b1ecea3b9d99bedd645df4ec3$__","opcodes":"","sourceMap":""}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]} diff --git a/test/cmdlineTests/linking_strict_assembly/output b/test/cmdlineTests/linking_strict_assembly/output index f232b606b..23b2826f1 100644 --- a/test/cmdlineTests/linking_strict_assembly/output +++ b/test/cmdlineTests/linking_strict_assembly/output @@ -10,7 +10,7 @@ object "a" { Binary representation: -73__$f919ba91ac99f96129544b80b9516b27a8$__50 +73123456789012345678901234567890123456789050 Text representation: linkerSymbol("f919ba91ac99f96129544b80b9516b27a80e376b9dc693819d0b18b7e0395612") diff --git a/test/cmdlineTests/linking_strict_assembly_unresolved_references/output b/test/cmdlineTests/linking_strict_assembly_unresolved_references/output index 759fceacf..accbaa09e 100644 --- a/test/cmdlineTests/linking_strict_assembly_unresolved_references/output +++ b/test/cmdlineTests/linking_strict_assembly_unresolved_references/output @@ -11,7 +11,7 @@ object "a" { Binary representation: -__$05b0326038374a21e0895480a58bda0768$____$fb58009a6b1ecea3b9d99bedd645df4ec3$__5050 +73123456789012345678901234567890123456789073__$fb58009a6b1ecea3b9d99bedd645df4ec3$__5050 Text representation: linkerSymbol("05b0326038374a21e0895480a58bda0768cdcc04c8d18f154362d1ca5223d245") diff --git a/test/libsolidity/SolidityExecutionFramework.cpp b/test/libsolidity/SolidityExecutionFramework.cpp index 4a0745431..e61f1469e 100644 --- a/test/libsolidity/SolidityExecutionFramework.cpp +++ b/test/libsolidity/SolidityExecutionFramework.cpp @@ -97,6 +97,7 @@ bytes SolidityExecutionFramework::multiSourceCompileContract( { asmStack.optimize(); obj = std::move(*asmStack.assemble(yul::AssemblyStack::Machine::EVM).bytecode); + obj.link(_libraryAddresses); break; } catch (...) From cd08dab4e644c7c237972d510ce3448d54e9b030 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 5 Nov 2020 17:26:04 +0000 Subject: [PATCH 08/13] [ewasm] Allow compiling Yul without "main" --- libyul/backends/wasm/BinaryTransform.cpp | 6 ++++-- libyul/backends/wasm/TextTransform.cpp | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libyul/backends/wasm/BinaryTransform.cpp b/libyul/backends/wasm/BinaryTransform.cpp index 6c19b19f5..58a34ac04 100644 --- a/libyul/backends/wasm/BinaryTransform.cpp +++ b/libyul/backends/wasm/BinaryTransform.cpp @@ -663,9 +663,11 @@ bytes BinaryTransform::globalSection(vector con bytes BinaryTransform::exportSection(map const& _functionIDs) { - bytes result = lebEncode(2); + bool hasMain = _functionIDs.count("main"); + bytes result = lebEncode(hasMain ? 2 : 1); result += encodeName("memory") + toBytes(Export::Memory) + lebEncode(0); - result += encodeName("main") + toBytes(Export::Function) + lebEncode(_functionIDs.at("main")); + if (hasMain) + result += encodeName("main") + toBytes(Export::Function) + lebEncode(_functionIDs.at("main")); return makeSection(Section::EXPORT, move(result)); } diff --git a/libyul/backends/wasm/TextTransform.cpp b/libyul/backends/wasm/TextTransform.cpp index 059f89600..89123b16c 100644 --- a/libyul/backends/wasm/TextTransform.cpp +++ b/libyul/backends/wasm/TextTransform.cpp @@ -56,8 +56,13 @@ string TextTransform::run(wasm::Module const& _module) // allocate one 64k page of memory and make it available to the Ethereum client ret += " (memory $memory (export \"memory\") 1)\n"; - // export the main function - ret += " (export \"main\" (func $main))\n"; + for (auto const& f: _module.functions) + if (f.name == "main") + { + // export the main function + ret += " (export \"main\" (func $main))\n"; + break; + } for (auto const& g: _module.globals) ret += " (global $" + g.variableName + " (mut " + encodeType(g.type) + ") (" + encodeType(g.type) + ".const 0))\n"; From e41700e5f79d789b738df613e00898f71708fe82 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 9 Nov 2020 17:43:41 +0000 Subject: [PATCH 09/13] [ewasm] Clarify custom section handling in BinaryTransform --- libyul/backends/wasm/BinaryTransform.cpp | 12 +++++++----- libyul/backends/wasm/BinaryTransform.h | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libyul/backends/wasm/BinaryTransform.cpp b/libyul/backends/wasm/BinaryTransform.cpp index 58a34ac04..87f47e28c 100644 --- a/libyul/backends/wasm/BinaryTransform.cpp +++ b/libyul/backends/wasm/BinaryTransform.cpp @@ -305,13 +305,15 @@ bytes BinaryTransform::run(Module const& _module) ret += exportSection(functionIDs); map> subModulePosAndSize; - for (auto const& sub: _module.subModules) + for (auto const& [name, module]: _module.subModules) { // TODO should we prefix and / or shorten the name? - bytes data = BinaryTransform::run(sub.second); - size_t length = data.size(); - ret += customSection(sub.first, move(data)); - subModulePosAndSize[sub.first] = {ret.size() - length, length}; + bytes data = BinaryTransform::run(module); + size_t const length = data.size(); + ret += customSection(name, move(data)); + // Skip all the previous sections and the size field of this current custom section. + size_t const offset = ret.size() - length; + subModulePosAndSize[name] = {offset, length}; } BinaryTransform bt( diff --git a/libyul/backends/wasm/BinaryTransform.h b/libyul/backends/wasm/BinaryTransform.h index 348250546..d164c11bf 100644 --- a/libyul/backends/wasm/BinaryTransform.h +++ b/libyul/backends/wasm/BinaryTransform.h @@ -112,6 +112,8 @@ private: std::map const m_globalIDs; std::map const m_functionIDs; std::map const m_functionTypes; + /// The map of submodules, where the pair refers to the [offset, length]. The offset is + /// an absolute offset within the resulting assembled bytecode. std::map> const m_subModulePosAndSize; std::map m_locals; From 6e11754c8b3820355ca6f9fa46a0872435e360ef Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 30 Oct 2020 18:03:27 +0000 Subject: [PATCH 10/13] [ewasm] Support compiling data subobjects --- libyul/backends/wasm/BinaryTransform.cpp | 8 ++++++++ libyul/backends/wasm/TextTransform.cpp | 5 +++++ libyul/backends/wasm/WasmAST.h | 3 +++ libyul/backends/wasm/WasmObjectCompiler.cpp | 4 +++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libyul/backends/wasm/BinaryTransform.cpp b/libyul/backends/wasm/BinaryTransform.cpp index 87f47e28c..17a9d0334 100644 --- a/libyul/backends/wasm/BinaryTransform.cpp +++ b/libyul/backends/wasm/BinaryTransform.cpp @@ -315,6 +315,14 @@ bytes BinaryTransform::run(Module const& _module) size_t const offset = ret.size() - length; subModulePosAndSize[name] = {offset, length}; } + for (auto const& [name, data]: _module.customSections) + { + size_t const length = data.size(); + ret += customSection(name, data); + // Skip all the previous sections and the size field of this current custom section. + size_t const offset = ret.size() - length; + subModulePosAndSize[name] = {offset, length}; + } BinaryTransform bt( move(globalIDs), diff --git a/libyul/backends/wasm/TextTransform.cpp b/libyul/backends/wasm/TextTransform.cpp index 89123b16c..05514cd7c 100644 --- a/libyul/backends/wasm/TextTransform.cpp +++ b/libyul/backends/wasm/TextTransform.cpp @@ -44,6 +44,11 @@ string TextTransform::run(wasm::Module const& _module) " ;; sub-module \"" + sub.first + "\" will be encoded as custom section in binary here, but is skipped in text mode.\n"; + for (auto const& data: _module.customSections) + ret += + " ;; custom-section \"" + + data.first + + "\" will be encoded as custom section in binary here, but is skipped in text mode.\n"; for (wasm::FunctionImport const& imp: _module.imports) { ret += " (import \"" + imp.module + "\" \"" + imp.externalName + "\" (func $" + imp.internalName; diff --git a/libyul/backends/wasm/WasmAST.h b/libyul/backends/wasm/WasmAST.h index ced3b7bc6..9abdd14d8 100644 --- a/libyul/backends/wasm/WasmAST.h +++ b/libyul/backends/wasm/WasmAST.h @@ -21,6 +21,8 @@ #pragma once +#include + #include #include #include @@ -108,6 +110,7 @@ struct Module std::vector imports; std::vector functions; std::map subModules; + std::map customSections; }; } diff --git a/libyul/backends/wasm/WasmObjectCompiler.cpp b/libyul/backends/wasm/WasmObjectCompiler.cpp index 2b4f0c355..bdd109d31 100644 --- a/libyul/backends/wasm/WasmObjectCompiler.cpp +++ b/libyul/backends/wasm/WasmObjectCompiler.cpp @@ -51,8 +51,10 @@ wasm::Module WasmObjectCompiler::run(Object& _object) for (auto& subNode: _object.subObjects) if (Object* subObject = dynamic_cast(subNode.get())) module.subModules[subObject->name.str()] = run(*subObject); + else if (Data* subObject = dynamic_cast(subNode.get())) + module.customSections[subObject->name.str()] = subObject->data; else - yulAssert(false, "Data is not yet supported for Wasm."); + yulAssert(false, ""); return module; } From 3246d0f9a907774674e7e7d4ebd6314772cf7adc Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 9 Nov 2020 18:11:44 +0000 Subject: [PATCH 11/13] [solc] Handle exceptions in AssemblyStack.translate() gracefully --- solc/CommandLineInterface.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 1d8e24b7e..42fe58a3b 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -1883,8 +1883,29 @@ bool CommandLineInterface::assemble( if (_language != yul::AssemblyStack::Language::Ewasm && _targetMachine == yul::AssemblyStack::Machine::Ewasm) { - stack.translate(yul::AssemblyStack::Language::Ewasm); - stack.optimize(); + try + { + stack.translate(yul::AssemblyStack::Language::Ewasm); + stack.optimize(); + } + catch (Exception const& _exception) + { + serr() << "Exception in assembler: " << boost::diagnostic_information(_exception) << endl; + return false; + } + catch (std::exception const& _e) + { + serr() << + "Unknown exception during compilation" << + (_e.what() ? ": " + string(_e.what()) : ".") << + endl; + return false; + } + catch (...) + { + serr() << "Unknown exception in assembler." << endl; + return false; + } sout() << endl << "==========================" << endl; sout() << endl << "Translated source:" << endl; From c002fcc39f2322516fe0bd79a0d3583a6e9de979 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 3 Nov 2020 23:39:29 +0000 Subject: [PATCH 12/13] Untangle headers and namespaces in TestFileParser --- test/libsolidity/util/BytesUtils.cpp | 2 -- test/libsolidity/util/ContractABIUtils.cpp | 1 - test/libsolidity/util/SoltestTypes.h | 1 - test/libsolidity/util/TestFileParser.cpp | 16 +++++++--------- test/libsolidity/util/TestFileParser.h | 4 +--- test/libsolidity/util/TestFunctionCall.cpp | 7 ++----- test/libsolidity/util/TestFunctionCall.h | 1 - 7 files changed, 10 insertions(+), 22 deletions(-) diff --git a/test/libsolidity/util/BytesUtils.cpp b/test/libsolidity/util/BytesUtils.cpp index e3a6fd4ed..d8892a4a7 100644 --- a/test/libsolidity/util/BytesUtils.cpp +++ b/test/libsolidity/util/BytesUtils.cpp @@ -36,11 +36,9 @@ using namespace solidity; using namespace solidity::util; -using namespace solidity::langutil; using namespace solidity::frontend; using namespace solidity::frontend::test; using namespace std; -using namespace soltest; bytes BytesUtils::alignLeft(bytes _bytes) { diff --git a/test/libsolidity/util/ContractABIUtils.cpp b/test/libsolidity/util/ContractABIUtils.cpp index 520569907..70e20c185 100644 --- a/test/libsolidity/util/ContractABIUtils.cpp +++ b/test/libsolidity/util/ContractABIUtils.cpp @@ -41,7 +41,6 @@ using namespace solidity::util; using namespace solidity::langutil; using namespace solidity::frontend::test; using namespace std; -using namespace soltest; namespace { diff --git a/test/libsolidity/util/SoltestTypes.h b/test/libsolidity/util/SoltestTypes.h index 7558dbd7d..e0f6caa1f 100644 --- a/test/libsolidity/util/SoltestTypes.h +++ b/test/libsolidity/util/SoltestTypes.h @@ -16,7 +16,6 @@ #include #include -#include namespace solidity::frontend::test { diff --git a/test/libsolidity/util/TestFileParser.cpp b/test/libsolidity/util/TestFileParser.cpp index 11eef3767..fc9a92d06 100644 --- a/test/libsolidity/util/TestFileParser.cpp +++ b/test/libsolidity/util/TestFileParser.cpp @@ -34,11 +34,11 @@ #include using namespace solidity; -using namespace solidity::langutil; using namespace solidity::frontend; using namespace solidity::frontend::test; using namespace std; -using namespace soltest; + +using Token = soltest::Token; char TestFileParser::Scanner::peek() const noexcept { @@ -158,7 +158,7 @@ vector TestFileParser::parseFunctionCall return calls; } -bool TestFileParser::accept(soltest::Token _token, bool const _expect) +bool TestFileParser::accept(Token _token, bool const _expect) { if (m_scanner.currentToken() != _token) return false; @@ -167,7 +167,7 @@ bool TestFileParser::accept(soltest::Token _token, bool const _expect) return true; } -bool TestFileParser::expect(soltest::Token _token, bool const _advance) +bool TestFileParser::expect(Token _token, bool const _advance) { if (m_scanner.currentToken() != _token || m_scanner.currentToken() == Token::Invalid) throw TestParserError( @@ -484,8 +484,6 @@ void TestFileParser::Scanner::readStream(istream& _stream) void TestFileParser::Scanner::scanNextToken() { - using namespace langutil; - // Make code coverage happy. assert(formatToken(Token::NUM_TOKENS) == ""); @@ -554,12 +552,12 @@ void TestFileParser::Scanner::scanNextToken() token = selectToken(Token::String, scanString()); break; default: - if (isIdentifierStart(current())) + if (langutil::isIdentifierStart(current())) { TokenDesc detectedToken = detectKeyword(scanIdentifierOrKeyword()); token = selectToken(detectedToken.first, detectedToken.second); } - else if (isDecimalDigit(current())) + else if (langutil::isDecimalDigit(current())) { if (current() == '0' && peek() == 'x') { @@ -570,7 +568,7 @@ void TestFileParser::Scanner::scanNextToken() else token = selectToken(Token::Number, scanDecimalNumber()); } - else if (isWhiteSpace(current())) + else if (langutil::isWhiteSpace(current())) token = selectToken(Token::Whitespace); else if (isEndOfLine()) token = make_pair(Token::EOS, "EOS"); diff --git a/test/libsolidity/util/TestFileParser.h b/test/libsolidity/util/TestFileParser.h index 8178c721d..231fc969b 100644 --- a/test/libsolidity/util/TestFileParser.h +++ b/test/libsolidity/util/TestFileParser.h @@ -15,7 +15,6 @@ #pragma once #include -#include #include #include @@ -64,7 +63,6 @@ public: std::vector parseFunctionCalls(std::size_t _lineOffset); private: - using Token = soltest::Token; /** * Token scanner that is used internally to abstract away character traversal. */ @@ -92,7 +90,7 @@ private: char scanHexPart(); private: - using TokenDesc = std::pair; + using TokenDesc = std::pair; /// Advances current position in the input stream. void advance(unsigned n = 1) diff --git a/test/libsolidity/util/TestFunctionCall.cpp b/test/libsolidity/util/TestFunctionCall.cpp index 3061b5f21..e13fccf09 100644 --- a/test/libsolidity/util/TestFunctionCall.cpp +++ b/test/libsolidity/util/TestFunctionCall.cpp @@ -30,6 +30,8 @@ using namespace solidity::util; using namespace solidity::frontend::test; using namespace std; +using Token = soltest::Token; + string TestFunctionCall::format( ErrorReporter& _errorReporter, string const& _linePrefix, @@ -37,9 +39,6 @@ string TestFunctionCall::format( bool const _highlight ) const { - using namespace soltest; - using Token = soltest::Token; - stringstream stream; bool highlight = !matchesExpectation() && _highlight; @@ -279,8 +278,6 @@ string TestFunctionCall::formatFailure( bool _highlight ) const { - using Token = soltest::Token; - stringstream os; os << formatToken(Token::Failure); diff --git a/test/libsolidity/util/TestFunctionCall.h b/test/libsolidity/util/TestFunctionCall.h index 6f21fc9eb..7daac093a 100644 --- a/test/libsolidity/util/TestFunctionCall.h +++ b/test/libsolidity/util/TestFunctionCall.h @@ -17,7 +17,6 @@ #include #include -#include #include #include #include From 81c448fb4c0a59877fd019e7cb2a48b5ad2a5fde Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 3 Nov 2020 20:19:02 +0000 Subject: [PATCH 13/13] Rework TestFileParser --- test/libsolidity/util/TestFileParser.cpp | 74 +++++++++++++----------- test/libsolidity/util/TestFileParser.h | 9 ++- 2 files changed, 43 insertions(+), 40 deletions(-) diff --git a/test/libsolidity/util/TestFileParser.cpp b/test/libsolidity/util/TestFileParser.cpp index fc9a92d06..675ba5f93 100644 --- a/test/libsolidity/util/TestFileParser.cpp +++ b/test/libsolidity/util/TestFileParser.cpp @@ -487,26 +487,28 @@ void TestFileParser::Scanner::scanNextToken() // Make code coverage happy. assert(formatToken(Token::NUM_TOKENS) == ""); - auto detectKeyword = [](std::string const& _literal = "") -> TokenDesc { - if (_literal == "true") return TokenDesc{Token::Boolean, _literal}; - if (_literal == "false") return TokenDesc{Token::Boolean, _literal}; - if (_literal == "ether") return TokenDesc{Token::Ether, _literal}; - if (_literal == "wei") return TokenDesc{Token::Wei, _literal}; - if (_literal == "left") return TokenDesc{Token::Left, _literal}; - if (_literal == "library") return TokenDesc{Token::Library, _literal}; - if (_literal == "right") return TokenDesc{Token::Right, _literal}; - if (_literal == "hex") return TokenDesc{Token::Hex, _literal}; - if (_literal == "FAILURE") return TokenDesc{Token::Failure, _literal}; - if (_literal == "storage") return TokenDesc{Token::Storage, _literal}; - return TokenDesc{Token::Identifier, _literal}; + auto detectKeyword = [](std::string const& _literal = "") -> std::pair { + if (_literal == "true") return {Token::Boolean, "true"}; + if (_literal == "false") return {Token::Boolean, "false"}; + if (_literal == "ether") return {Token::Ether, ""}; + if (_literal == "wei") return {Token::Wei, ""}; + if (_literal == "left") return {Token::Left, ""}; + if (_literal == "library") return {Token::Library, ""}; + if (_literal == "right") return {Token::Right, ""}; + if (_literal == "hex") return {Token::Hex, ""}; + if (_literal == "FAILURE") return {Token::Failure, ""}; + if (_literal == "storage") return {Token::Storage, ""}; + return {Token::Identifier, _literal}; }; - auto selectToken = [this](Token _token, std::optional _literal = std::nullopt) -> TokenDesc { + auto selectToken = [this](Token _token, std::string const& _literal = "") { advance(); - return make_pair(_token, _literal.has_value() ? *_literal : formatToken(_token)); + m_currentToken = _token; + m_currentLiteral = _literal; }; - TokenDesc token = make_pair(Token::Unknown, ""); + m_currentToken = Token::Unknown; + m_currentLiteral = ""; do { switch(current()) @@ -514,48 +516,48 @@ void TestFileParser::Scanner::scanNextToken() case '/': advance(); if (current() == '/') - token = selectToken(Token::Newline); + selectToken(Token::Newline); else - token = selectToken(Token::Invalid); + selectToken(Token::Invalid); break; case '-': if (peek() == '>') { advance(); - token = selectToken(Token::Arrow); + selectToken(Token::Arrow); } else - token = selectToken(Token::Sub); + selectToken(Token::Sub); break; case ':': - token = selectToken(Token::Colon); + selectToken(Token::Colon); break; case '#': - token = selectToken(Token::Comment, scanComment()); + selectToken(Token::Comment, scanComment()); break; case ',': - token = selectToken(Token::Comma); + selectToken(Token::Comma); break; case '(': - token = selectToken(Token::LParen); + selectToken(Token::LParen); break; case ')': - token = selectToken(Token::RParen); + selectToken(Token::RParen); break; case '[': - token = selectToken(Token::LBrack); + selectToken(Token::LBrack); break; case ']': - token = selectToken(Token::RBrack); + selectToken(Token::RBrack); break; case '\"': - token = selectToken(Token::String, scanString()); + selectToken(Token::String, scanString()); break; default: if (langutil::isIdentifierStart(current())) { - TokenDesc detectedToken = detectKeyword(scanIdentifierOrKeyword()); - token = selectToken(detectedToken.first, detectedToken.second); + std::tie(m_currentToken, m_currentLiteral) = detectKeyword(scanIdentifierOrKeyword()); + advance(); } else if (langutil::isDecimalDigit(current())) { @@ -563,22 +565,24 @@ void TestFileParser::Scanner::scanNextToken() { advance(); advance(); - token = selectToken(Token::HexNumber, "0x" + scanHexNumber()); + selectToken(Token::HexNumber, "0x" + scanHexNumber()); } else - token = selectToken(Token::Number, scanDecimalNumber()); + selectToken(Token::Number, scanDecimalNumber()); } else if (langutil::isWhiteSpace(current())) - token = selectToken(Token::Whitespace); + selectToken(Token::Whitespace); else if (isEndOfLine()) - token = make_pair(Token::EOS, "EOS"); + { + m_currentToken = Token::EOS; + m_currentLiteral = ""; + } else throw TestParserError("Unexpected character: '" + string{current()} + "'"); break; } } - while (token.first == Token::Whitespace); - m_currentToken = token; + while (m_currentToken == Token::Whitespace); } string TestFileParser::Scanner::scanComment() diff --git a/test/libsolidity/util/TestFileParser.h b/test/libsolidity/util/TestFileParser.h index 231fc969b..63a95dd4a 100644 --- a/test/libsolidity/util/TestFileParser.h +++ b/test/libsolidity/util/TestFileParser.h @@ -79,8 +79,8 @@ private: /// Reads character stream and creates token. void scanNextToken(); - soltest::Token currentToken() { return m_currentToken.first; } - std::string currentLiteral() { return m_currentToken.second; } + soltest::Token currentToken() { return m_currentToken; } + std::string currentLiteral() { return m_currentLiteral; } std::string scanComment(); std::string scanIdentifierOrKeyword(); @@ -90,8 +90,6 @@ private: char scanHexPart(); private: - using TokenDesc = std::pair; - /// Advances current position in the input stream. void advance(unsigned n = 1) { @@ -118,7 +116,8 @@ private: std::string m_line; std::string::const_iterator m_char; - TokenDesc m_currentToken; + std::string m_currentLiteral; + soltest::Token m_currentToken = soltest::Token::Unknown; }; bool accept(soltest::Token _token, bool const _expect = false);