Merge pull request #14177 from GiokaMarkella/develop

Add support for Yul ASTs output
This commit is contained in:
Kamil Śliwak 2023-05-26 13:25:54 +02:00 committed by GitHub
commit 37506b1a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 4542 additions and 43 deletions

View File

@ -4,8 +4,12 @@ Language Features:
Compiler Features: Compiler Features:
* Commandline Interface: Add ``--ast-compact-json`` output in assembler mode.
* Commandline Interface: Add ``--ir-ast-json`` and ``--ir-optimized-ast-json`` outputs for Solidity input, providing AST in compact JSON format for IR and optimized IR.
* EWasm: Remove EWasm backend. * EWasm: Remove EWasm backend.
* Parser: Introduce ``pragma experimental solidity``, which will enable an experimental language mode that in particular has no stability guarantees between non-breaking releases and is not suited for production use. * Parser: Introduce ``pragma experimental solidity``, which will enable an experimental language mode that in particular has no stability guarantees between non-breaking releases and is not suited for production use.
* Standard JSON Interface: Add ``ast`` file-level output for Yul input.
* Standard JSON Interface: Add ``irAst`` and ``irOptimizedAst`` contract-level outputs for Solidity input, providing AST in compact JSON format for IR and optimized IR.
Bugfixes: Bugfixes:

View File

@ -390,7 +390,9 @@ Input Description
// userdoc - User documentation (natspec) // userdoc - User documentation (natspec)
// metadata - Metadata // metadata - Metadata
// ir - Yul intermediate representation of the code before optimization // ir - Yul intermediate representation of the code before optimization
// irAst - AST of Yul intermediate representation of the code before optimization
// irOptimized - Intermediate representation after optimization // irOptimized - Intermediate representation after optimization
// irOptimizedAst - AST of intermediate representation after optimization
// storageLayout - Slots, offsets and types of the contract's state variables. // storageLayout - Slots, offsets and types of the contract's state variables.
// evm.assembly - New assembly format // evm.assembly - New assembly format
// evm.legacyAssembly - Old-style assembly format in JSON // evm.legacyAssembly - Old-style assembly format in JSON
@ -536,8 +538,14 @@ Output Description
"userdoc": {}, "userdoc": {},
// Developer documentation (natspec) // Developer documentation (natspec)
"devdoc": {}, "devdoc": {},
// Intermediate representation (string) // Intermediate representation before optimization (string)
"ir": "", "ir": "",
// AST of intermediate representation before optimization
"irAst": {/* ... */},
// Intermediate representation after optimization (string)
"irOptimized": "",
// AST of intermediate representation after optimization
"irOptimizedAst": {/* ... */},
// See the Storage Layout documentation. // See the Storage Layout documentation.
"storageLayout": {"storage": [/* ... */], "types": {/* ... */} }, "storageLayout": {"storage": [/* ... */], "types": {/* ... */} },
// EVM-related outputs // EVM-related outputs

View File

@ -40,6 +40,8 @@
#include <liblangutil/SourceReferenceFormatter.h> #include <liblangutil/SourceReferenceFormatter.h>
#include <json/json.h>
#include <sstream> #include <sstream>
#include <variant> #include <variant>
@ -87,7 +89,7 @@ set<CallableDeclaration const*, ASTNode::CompareByID> collectReachableCallables(
} }
pair<string, string> IRGenerator::run( tuple<string, Json::Value, string, Json::Value> IRGenerator::run(
ContractDefinition const& _contract, ContractDefinition const& _contract,
bytes const& _cborMetadata, bytes const& _cborMetadata,
map<ContractDefinition const*, string_view const> const& _otherYulSources map<ContractDefinition const*, string_view const> const& _otherYulSources
@ -112,9 +114,11 @@ pair<string, string> IRGenerator::run(
); );
solAssert(false, ir + "\n\nInvalid IR generated:\n" + errorMessage + "\n"); solAssert(false, ir + "\n\nInvalid IR generated:\n" + errorMessage + "\n");
} }
Json::Value irAst = asmStack.astJson();
asmStack.optimize(); asmStack.optimize();
Json::Value irOptAst = asmStack.astJson();
return {std::move(ir), asmStack.print(m_context.soliditySourceProvider())}; return {std::move(ir), std::move(irAst), asmStack.print(m_context.soliditySourceProvider()), std::move(irOptAst)};
} }
string IRGenerator::generate( string IRGenerator::generate(

View File

@ -32,6 +32,8 @@
#include <liblangutil/CharStreamProvider.h> #include <liblangutil/CharStreamProvider.h>
#include <liblangutil/EVMVersion.h> #include <liblangutil/EVMVersion.h>
#include <json/json.h>
#include <string> #include <string>
namespace solidity::frontend namespace solidity::frontend
@ -70,7 +72,7 @@ public:
/// Generates and returns the IR code, in unoptimized and optimized form /// Generates and returns the IR code, in unoptimized and optimized form
/// (or just pretty-printed, depending on the optimizer settings). /// (or just pretty-printed, depending on the optimizer settings).
std::pair<std::string, std::string> run( std::tuple<std::string, Json::Value, std::string, Json::Value> run(
ContractDefinition const& _contract, ContractDefinition const& _contract,
bytes const& _cborMetadata, bytes const& _cborMetadata,
std::map<ContractDefinition const*, std::string_view const> const& _otherYulSources std::map<ContractDefinition const*, std::string_view const> const& _otherYulSources

View File

@ -883,6 +883,14 @@ string const& CompilerStack::yulIR(string const& _contractName) const
return contract(_contractName).yulIR; return contract(_contractName).yulIR;
} }
Json::Value const& CompilerStack::yulIRAst(string const& _contractName) const
{
if (m_stackState != CompilationSuccessful)
solThrow(CompilerError, "Compilation was not successful.");
return contract(_contractName).yulIRAst;
}
string const& CompilerStack::yulIROptimized(string const& _contractName) const string const& CompilerStack::yulIROptimized(string const& _contractName) const
{ {
if (m_stackState != CompilationSuccessful) if (m_stackState != CompilationSuccessful)
@ -891,6 +899,14 @@ string const& CompilerStack::yulIROptimized(string const& _contractName) const
return contract(_contractName).yulIROptimized; return contract(_contractName).yulIROptimized;
} }
Json::Value const& CompilerStack::yulIROptimizedAst(string const& _contractName) const
{
if (m_stackState != CompilationSuccessful)
solThrow(CompilerError, "Compilation was not successful.");
return contract(_contractName).yulIROptimizedAst;
}
evmasm::LinkerObject const& CompilerStack::object(string const& _contractName) const evmasm::LinkerObject const& CompilerStack::object(string const& _contractName) const
{ {
if (m_stackState != CompilationSuccessful) if (m_stackState != CompilationSuccessful)
@ -1445,7 +1461,13 @@ void CompilerStack::generateIR(ContractDefinition const& _contract)
m_debugInfoSelection, m_debugInfoSelection,
this this
); );
tie(compiledContract.yulIR, compiledContract.yulIROptimized) = generator.run(
tie(
compiledContract.yulIR,
compiledContract.yulIRAst,
compiledContract.yulIROptimized,
compiledContract.yulIROptimizedAst
) = generator.run(
_contract, _contract,
createCBORMetadata(compiledContract, /* _forIR */ true), createCBORMetadata(compiledContract, /* _forIR */ true),
otherYulSources otherYulSources

View File

@ -276,9 +276,15 @@ public:
/// @returns the IR representation of a contract. /// @returns the IR representation of a contract.
std::string const& yulIR(std::string const& _contractName) const; std::string const& yulIR(std::string const& _contractName) const;
/// @returns the IR representation of a contract AST in format.
Json::Value const& yulIRAst(std::string const& _contractName) const;
/// @returns the optimized IR representation of a contract. /// @returns the optimized IR representation of a contract.
std::string const& yulIROptimized(std::string const& _contractName) const; std::string const& yulIROptimized(std::string const& _contractName) const;
/// @returns the optimized IR representation of a contract AST in JSON format.
Json::Value const& yulIROptimizedAst(std::string const& _contractName) const;
/// @returns the assembled object for a contract. /// @returns the assembled object for a contract.
evmasm::LinkerObject const& object(std::string const& _contractName) const; evmasm::LinkerObject const& object(std::string const& _contractName) const;
@ -380,6 +386,8 @@ private:
evmasm::LinkerObject runtimeObject; ///< Runtime object. evmasm::LinkerObject runtimeObject; ///< Runtime object.
std::string yulIR; ///< Yul IR code. std::string yulIR; ///< Yul IR code.
std::string yulIROptimized; ///< Optimized Yul IR code. std::string yulIROptimized; ///< Optimized Yul IR code.
Json::Value yulIRAst; ///< JSON AST of Yul IR code.
Json::Value yulIROptimizedAst; ///< JSON AST of optimized Yul IR code.
util::LazyInit<std::string const> metadata; ///< The metadata json that will be hashed into the chain. util::LazyInit<std::string const> metadata; ///< The metadata json that will be hashed into the chain.
util::LazyInit<Json::Value const> abi; util::LazyInit<Json::Value const> abi;
util::LazyInit<Json::Value const> storageLayout; util::LazyInit<Json::Value const> storageLayout;

View File

@ -179,7 +179,7 @@ bool hashMatchesContent(string const& _hash, string const& _content)
bool isArtifactRequested(Json::Value const& _outputSelection, string const& _artifact, bool _wildcardMatchesExperimental) bool isArtifactRequested(Json::Value const& _outputSelection, string const& _artifact, bool _wildcardMatchesExperimental)
{ {
static set<string> experimental{"ir", "irOptimized"}; static set<string> experimental{"ir", "irAst", "irOptimized", "irOptimizedAst"};
for (auto const& selectedArtifactJson: _outputSelection) for (auto const& selectedArtifactJson: _outputSelection)
{ {
string const& selectedArtifact = selectedArtifactJson.asString(); string const& selectedArtifact = selectedArtifactJson.asString();
@ -263,7 +263,7 @@ bool isBinaryRequested(Json::Value const& _outputSelection)
// This does not include "evm.methodIdentifiers" on purpose! // This does not include "evm.methodIdentifiers" on purpose!
static vector<string> const outputsThatRequireBinaries = vector<string>{ static vector<string> const outputsThatRequireBinaries = vector<string>{
"*", "*",
"ir", "irOptimized", "ir", "irAst", "irOptimized", "irOptimizedAst",
"evm.gasEstimates", "evm.legacyAssembly", "evm.assembly" "evm.gasEstimates", "evm.legacyAssembly", "evm.assembly"
} + evmObjectComponents("bytecode") + evmObjectComponents("deployedBytecode"); } + evmObjectComponents("bytecode") + evmObjectComponents("deployedBytecode");
@ -295,7 +295,7 @@ bool isEvmBytecodeRequested(Json::Value const& _outputSelection)
} }
/// @returns true if any Yul IR was requested. Note that as an exception, '*' does not /// @returns true if any Yul IR was requested. Note that as an exception, '*' does not
/// yet match "ir" or "irOptimized" /// yet match "ir", "irAst", "irOptimized" or "irOptimizedAst"
bool isIRRequested(Json::Value const& _outputSelection) bool isIRRequested(Json::Value const& _outputSelection)
{ {
if (!_outputSelection.isObject()) if (!_outputSelection.isObject())
@ -304,7 +304,12 @@ bool isIRRequested(Json::Value const& _outputSelection)
for (auto const& fileRequests: _outputSelection) for (auto const& fileRequests: _outputSelection)
for (auto const& requests: fileRequests) for (auto const& requests: fileRequests)
for (auto const& request: requests) for (auto const& request: requests)
if (request == "ir" || request == "irOptimized") if (
request == "ir" ||
request == "irAst" ||
request == "irOptimized" ||
request == "irOptimizedAst"
)
return true; return true;
return false; return false;
@ -1350,8 +1355,12 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
// IR // IR
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ir", wildcardMatchesExperimental)) if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ir", wildcardMatchesExperimental))
contractData["ir"] = compilerStack.yulIR(contractName); contractData["ir"] = compilerStack.yulIR(contractName);
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "irAst", wildcardMatchesExperimental))
contractData["irAst"] = compilerStack.yulIRAst(contractName);
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "irOptimized", wildcardMatchesExperimental)) if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "irOptimized", wildcardMatchesExperimental))
contractData["irOptimized"] = compilerStack.yulIROptimized(contractName); contractData["irOptimized"] = compilerStack.yulIROptimized(contractName);
if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "irOptimizedAst", wildcardMatchesExperimental))
contractData["irOptimizedAst"] = compilerStack.yulIROptimizedAst(contractName);
// EVM // EVM
Json::Value evmData(Json::objectValue); Json::Value evmData(Json::objectValue);
@ -1513,6 +1522,13 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings)
if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, contractName, "ir", wildcardMatchesExperimental)) if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, contractName, "ir", wildcardMatchesExperimental))
output["contracts"][sourceName][contractName]["ir"] = stack.print(); output["contracts"][sourceName][contractName]["ir"] = stack.print();
if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, contractName, "ast", wildcardMatchesExperimental))
{
Json::Value sourceResult = Json::objectValue;
sourceResult["id"] = 1;
sourceResult["ast"] = stack.astJson();
output["sources"][sourceName] = sourceResult;
}
stack.optimize(); stack.optimize();
MachineAssemblyObject object; MachineAssemblyObject object;

View File

@ -33,7 +33,7 @@ namespace solidity::yul
Json::Value AsmJsonConverter::operator()(Block const& _node) const Json::Value AsmJsonConverter::operator()(Block const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulBlock"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulBlock");
ret["statements"] = vectorOfVariantsToJson(_node.statements); ret["statements"] = vectorOfVariantsToJson(_node.statements);
return ret; return ret;
} }
@ -41,7 +41,7 @@ Json::Value AsmJsonConverter::operator()(Block const& _node) const
Json::Value AsmJsonConverter::operator()(TypedName const& _node) const Json::Value AsmJsonConverter::operator()(TypedName const& _node) const
{ {
yulAssert(!_node.name.empty(), "Invalid variable name."); yulAssert(!_node.name.empty(), "Invalid variable name.");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulTypedName"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulTypedName");
ret["name"] = _node.name.str(); ret["name"] = _node.name.str();
ret["type"] = _node.type.str(); ret["type"] = _node.type.str();
return ret; return ret;
@ -49,7 +49,7 @@ Json::Value AsmJsonConverter::operator()(TypedName const& _node) const
Json::Value AsmJsonConverter::operator()(Literal const& _node) const Json::Value AsmJsonConverter::operator()(Literal const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulLiteral"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulLiteral");
switch (_node.kind) switch (_node.kind)
{ {
case LiteralKind::Number: case LiteralKind::Number:
@ -76,7 +76,7 @@ Json::Value AsmJsonConverter::operator()(Literal const& _node) const
Json::Value AsmJsonConverter::operator()(Identifier const& _node) const Json::Value AsmJsonConverter::operator()(Identifier const& _node) const
{ {
yulAssert(!_node.name.empty(), "Invalid identifier"); yulAssert(!_node.name.empty(), "Invalid identifier");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulIdentifier"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulIdentifier");
ret["name"] = _node.name.str(); ret["name"] = _node.name.str();
return ret; return ret;
} }
@ -84,7 +84,7 @@ Json::Value AsmJsonConverter::operator()(Identifier const& _node) const
Json::Value AsmJsonConverter::operator()(Assignment const& _node) const Json::Value AsmJsonConverter::operator()(Assignment const& _node) const
{ {
yulAssert(_node.variableNames.size() >= 1, "Invalid assignment syntax"); yulAssert(_node.variableNames.size() >= 1, "Invalid assignment syntax");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulAssignment"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulAssignment");
for (auto const& var: _node.variableNames) for (auto const& var: _node.variableNames)
ret["variableNames"].append((*this)(var)); ret["variableNames"].append((*this)(var));
ret["value"] = _node.value ? std::visit(*this, *_node.value) : Json::nullValue; ret["value"] = _node.value ? std::visit(*this, *_node.value) : Json::nullValue;
@ -93,7 +93,7 @@ Json::Value AsmJsonConverter::operator()(Assignment const& _node) const
Json::Value AsmJsonConverter::operator()(FunctionCall const& _node) const Json::Value AsmJsonConverter::operator()(FunctionCall const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulFunctionCall"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulFunctionCall");
ret["functionName"] = (*this)(_node.functionName); ret["functionName"] = (*this)(_node.functionName);
ret["arguments"] = vectorOfVariantsToJson(_node.arguments); ret["arguments"] = vectorOfVariantsToJson(_node.arguments);
return ret; return ret;
@ -101,14 +101,14 @@ Json::Value AsmJsonConverter::operator()(FunctionCall const& _node) const
Json::Value AsmJsonConverter::operator()(ExpressionStatement const& _node) const Json::Value AsmJsonConverter::operator()(ExpressionStatement const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulExpressionStatement"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulExpressionStatement");
ret["expression"] = std::visit(*this, _node.expression); ret["expression"] = std::visit(*this, _node.expression);
return ret; return ret;
} }
Json::Value AsmJsonConverter::operator()(VariableDeclaration const& _node) const Json::Value AsmJsonConverter::operator()(VariableDeclaration const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulVariableDeclaration"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulVariableDeclaration");
for (auto const& var: _node.variables) for (auto const& var: _node.variables)
ret["variables"].append((*this)(var)); ret["variables"].append((*this)(var));
@ -120,7 +120,7 @@ Json::Value AsmJsonConverter::operator()(VariableDeclaration const& _node) const
Json::Value AsmJsonConverter::operator()(FunctionDefinition const& _node) const Json::Value AsmJsonConverter::operator()(FunctionDefinition const& _node) const
{ {
yulAssert(!_node.name.empty(), "Invalid function name."); yulAssert(!_node.name.empty(), "Invalid function name.");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulFunctionDefinition"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulFunctionDefinition");
ret["name"] = _node.name.str(); ret["name"] = _node.name.str();
for (auto const& var: _node.parameters) for (auto const& var: _node.parameters)
ret["parameters"].append((*this)(var)); ret["parameters"].append((*this)(var));
@ -133,7 +133,7 @@ Json::Value AsmJsonConverter::operator()(FunctionDefinition const& _node) const
Json::Value AsmJsonConverter::operator()(If const& _node) const Json::Value AsmJsonConverter::operator()(If const& _node) const
{ {
yulAssert(_node.condition, "Invalid if condition."); yulAssert(_node.condition, "Invalid if condition.");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulIf"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulIf");
ret["condition"] = std::visit(*this, *_node.condition); ret["condition"] = std::visit(*this, *_node.condition);
ret["body"] = (*this)(_node.body); ret["body"] = (*this)(_node.body);
return ret; return ret;
@ -142,7 +142,7 @@ Json::Value AsmJsonConverter::operator()(If const& _node) const
Json::Value AsmJsonConverter::operator()(Switch const& _node) const Json::Value AsmJsonConverter::operator()(Switch const& _node) const
{ {
yulAssert(_node.expression, "Invalid expression pointer."); yulAssert(_node.expression, "Invalid expression pointer.");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulSwitch"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulSwitch");
ret["expression"] = std::visit(*this, *_node.expression); ret["expression"] = std::visit(*this, *_node.expression);
for (auto const& var: _node.cases) for (auto const& var: _node.cases)
ret["cases"].append((*this)(var)); ret["cases"].append((*this)(var));
@ -151,7 +151,7 @@ Json::Value AsmJsonConverter::operator()(Switch const& _node) const
Json::Value AsmJsonConverter::operator()(Case const& _node) const Json::Value AsmJsonConverter::operator()(Case const& _node) const
{ {
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulCase"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulCase");
ret["value"] = _node.value ? (*this)(*_node.value) : "default"; ret["value"] = _node.value ? (*this)(*_node.value) : "default";
ret["body"] = (*this)(_node.body); ret["body"] = (*this)(_node.body);
return ret; return ret;
@ -160,7 +160,7 @@ Json::Value AsmJsonConverter::operator()(Case const& _node) const
Json::Value AsmJsonConverter::operator()(ForLoop const& _node) const Json::Value AsmJsonConverter::operator()(ForLoop const& _node) const
{ {
yulAssert(_node.condition, "Invalid for loop condition."); yulAssert(_node.condition, "Invalid for loop condition.");
Json::Value ret = createAstNode(nativeLocationOf(_node), "YulForLoop"); Json::Value ret = createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulForLoop");
ret["pre"] = (*this)(_node.pre); ret["pre"] = (*this)(_node.pre);
ret["condition"] = std::visit(*this, *_node.condition); ret["condition"] = std::visit(*this, *_node.condition);
ret["post"] = (*this)(_node.post); ret["post"] = (*this)(_node.post);
@ -170,27 +170,30 @@ Json::Value AsmJsonConverter::operator()(ForLoop const& _node) const
Json::Value AsmJsonConverter::operator()(Break const& _node) const Json::Value AsmJsonConverter::operator()(Break const& _node) const
{ {
return createAstNode(nativeLocationOf(_node), "YulBreak"); return createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulBreak");
} }
Json::Value AsmJsonConverter::operator()(Continue const& _node) const Json::Value AsmJsonConverter::operator()(Continue const& _node) const
{ {
return createAstNode(nativeLocationOf(_node), "YulContinue"); return createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulContinue");
} }
Json::Value AsmJsonConverter::operator()(Leave const& _node) const Json::Value AsmJsonConverter::operator()(Leave const& _node) const
{ {
return createAstNode(nativeLocationOf(_node), "YulLeave"); return createAstNode(originLocationOf(_node), nativeLocationOf(_node), "YulLeave");
} }
Json::Value AsmJsonConverter::createAstNode(langutil::SourceLocation const& _location, string _nodeType) const Json::Value AsmJsonConverter::createAstNode(langutil::SourceLocation const& _originLocation, langutil::SourceLocation const& _nativeLocation, string _nodeType) const
{ {
Json::Value ret{Json::objectValue}; Json::Value ret{Json::objectValue};
ret["nodeType"] = std::move(_nodeType); ret["nodeType"] = std::move(_nodeType);
int length = -1; auto srcLocation = [&](int start, int end) -> string
if (_location.start >= 0 && _location.end >= 0) {
length = _location.end - _location.start; int length = (start >= 0 && end >= 0 && end >= start) ? end - start : -1;
ret["src"] = to_string(_location.start) + ":" + to_string(length) + ":" + (m_sourceIndex.has_value() ? to_string(m_sourceIndex.value()) : "-1"); return to_string(start) + ":" + to_string(length) + ":" + (m_sourceIndex.has_value() ? to_string(m_sourceIndex.value()) : "-1");
};
ret["src"] = srcLocation(_originLocation.start, _originLocation.end);
ret["nativeSrc"] = srcLocation(_nativeLocation.start, _nativeLocation.end);
return ret; return ret;
} }

View File

@ -62,7 +62,7 @@ public:
Json::Value operator()(Label const& _node) const; Json::Value operator()(Label const& _node) const;
private: private:
Json::Value createAstNode(langutil::SourceLocation const& _location, std::string _nodeType) const; Json::Value createAstNode(langutil::SourceLocation const& _originLocation, langutil::SourceLocation const& _nativeLocation, std::string _nodeType) const;
template <class T> template <class T>
Json::Value vectorOfVariantsToJson(std::vector<T> const& vec) const; Json::Value vectorOfVariantsToJson(std::vector<T> const& vec) const;

View File

@ -22,6 +22,8 @@
#include <libyul/Object.h> #include <libyul/Object.h>
#include <libyul/AsmPrinter.h> #include <libyul/AsmPrinter.h>
#include <libyul/AsmJsonConverter.h>
#include <libyul/AST.h>
#include <libyul/Exceptions.h> #include <libyul/Exceptions.h>
#include <libsolutil/CommonData.h> #include <libsolutil/CommonData.h>
@ -88,6 +90,34 @@ string Object::toString(
return useSrcComment + "object \"" + name.str() + "\" {\n" + indent(inner) + "\n}"; return useSrcComment + "object \"" + name.str() + "\" {\n" + indent(inner) + "\n}";
} }
Json::Value Data::toJson() const
{
Json::Value ret{Json::objectValue};
ret["nodeType"] = "YulData";
ret["value"] = util::toHex(data);
return ret;
}
Json::Value Object::toJson() const
{
yulAssert(code, "No code");
Json::Value codeJson{Json::objectValue};
codeJson["nodeType"] = "YulCode";
codeJson["block"] = AsmJsonConverter(0 /* sourceIndex */)(*code);
Json::Value subObjectsJson{Json::arrayValue};
for (shared_ptr<ObjectNode> const& subObject: subObjects)
subObjectsJson.append(subObject->toJson());
Json::Value ret{Json::objectValue};
ret["nodeType"] = "YulObject";
ret["name"] = name.str();
ret["code"] = codeJson;
ret["subObjects"] = subObjectsJson;
return ret;
}
set<YulString> Object::qualifiedDataNames() const set<YulString> Object::qualifiedDataNames() const
{ {
set<YulString> qualifiedNames = set<YulString> qualifiedNames =

View File

@ -32,13 +32,13 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <limits> #include <limits>
#include <json/json.h>
namespace solidity::yul namespace solidity::yul
{ {
struct Dialect; struct Dialect;
struct AsmAnalysisInfo; struct AsmAnalysisInfo;
using SourceNameMap = std::map<unsigned, std::shared_ptr<std::string const>>; using SourceNameMap = std::map<unsigned, std::shared_ptr<std::string const>>;
struct Object; struct Object;
@ -58,6 +58,7 @@ struct ObjectNode
langutil::DebugInfoSelection const& _debugInfoSelection, langutil::DebugInfoSelection const& _debugInfoSelection,
langutil::CharStreamProvider const* _soliditySourceProvider langutil::CharStreamProvider const* _soliditySourceProvider
) const = 0; ) const = 0;
virtual Json::Value toJson() const = 0;
}; };
/** /**
@ -74,6 +75,7 @@ struct Data: public ObjectNode
langutil::DebugInfoSelection const& _debugInfoSelection, langutil::DebugInfoSelection const& _debugInfoSelection,
langutil::CharStreamProvider const* _soliditySourceProvider langutil::CharStreamProvider const* _soliditySourceProvider
) const override; ) const override;
Json::Value toJson() const override;
}; };
@ -95,7 +97,8 @@ public:
langutil::DebugInfoSelection const& _debugInfoSelection = langutil::DebugInfoSelection::Default(), langutil::DebugInfoSelection const& _debugInfoSelection = langutil::DebugInfoSelection::Default(),
langutil::CharStreamProvider const* _soliditySourceProvider = nullptr langutil::CharStreamProvider const* _soliditySourceProvider = nullptr
) const; ) const;
/// @returns a compact JSON representation of the AST.
Json::Value toJson() const;
/// @returns the set of names of data objects accessible from within the code of /// @returns the set of names of data objects accessible from within the code of
/// this object, including the name of object itself /// this object, including the name of object itself
/// Handles all names containing dots as reserved identifiers, not accessible as data. /// Handles all names containing dots as reserved identifiers, not accessible as data.

View File

@ -31,10 +31,11 @@
#include <libyul/backends/evm/EVMMetrics.h> #include <libyul/backends/evm/EVMMetrics.h>
#include <libyul/ObjectParser.h> #include <libyul/ObjectParser.h>
#include <libyul/optimiser/Suite.h> #include <libyul/optimiser/Suite.h>
#include <libevmasm/Assembly.h> #include <libevmasm/Assembly.h>
#include <liblangutil/Scanner.h> #include <liblangutil/Scanner.h>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <optional> #include <optional>
using namespace std; using namespace std;
@ -270,6 +271,13 @@ string YulStack::print(
return m_parserResult->toString(&languageToDialect(m_language, m_evmVersion), m_debugInfoSelection, _soliditySourceProvider) + "\n"; return m_parserResult->toString(&languageToDialect(m_language, m_evmVersion), m_debugInfoSelection, _soliditySourceProvider) + "\n";
} }
Json::Value YulStack::astJson() const
{
yulAssert(m_parserResult, "");
yulAssert(m_parserResult->code, "");
return m_parserResult->toJson();
}
shared_ptr<Object> YulStack::parserResult() const shared_ptr<Object> YulStack::parserResult() const
{ {
yulAssert(m_analysisSuccessful, "Analysis was not successful."); yulAssert(m_analysisSuccessful, "Analysis was not successful.");

View File

@ -33,6 +33,8 @@
#include <libevmasm/LinkerObject.h> #include <libevmasm/LinkerObject.h>
#include <json/json.h>
#include <memory> #include <memory>
#include <string> #include <string>
@ -130,7 +132,7 @@ public:
std::string print( std::string print(
langutil::CharStreamProvider const* _soliditySourceProvider = nullptr langutil::CharStreamProvider const* _soliditySourceProvider = nullptr
) const; ) const;
Json::Value astJson() const;
/// Return the parsed and analyzed object. /// Return the parsed and analyzed object.
std::shared_ptr<Object> parserResult() const; std::shared_ptr<Object> parserResult() const;

View File

@ -223,6 +223,31 @@ void CommandLineInterface::handleIR(string const& _contractName)
} }
} }
void CommandLineInterface::handleIRAst(string const& _contractName)
{
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
if (!m_options.compiler.outputs.irAstJson)
return;
if (!m_options.output.dir.empty())
createFile(
m_compiler->filesystemFriendlyName(_contractName) + "_yul_ast.json",
util::jsonPrint(
m_compiler->yulIRAst(_contractName),
m_options.formatting.json
)
);
else
{
sout() << "IR AST:" << endl;
sout() << util::jsonPrint(
m_compiler->yulIRAst(_contractName),
m_options.formatting.json
) << endl;
}
}
void CommandLineInterface::handleIROptimized(string const& _contractName) void CommandLineInterface::handleIROptimized(string const& _contractName)
{ {
solAssert(CompilerInputModes.count(m_options.input.mode) == 1); solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
@ -231,7 +256,10 @@ void CommandLineInterface::handleIROptimized(string const& _contractName)
return; return;
if (!m_options.output.dir.empty()) if (!m_options.output.dir.empty())
createFile(m_compiler->filesystemFriendlyName(_contractName) + "_opt.yul", m_compiler->yulIROptimized(_contractName)); createFile(
m_compiler->filesystemFriendlyName(_contractName) + "_opt.yul",
m_compiler->yulIROptimized(_contractName)
);
else else
{ {
sout() << "Optimized IR:" << endl; sout() << "Optimized IR:" << endl;
@ -239,6 +267,31 @@ void CommandLineInterface::handleIROptimized(string const& _contractName)
} }
} }
void CommandLineInterface::handleIROptimizedAst(string const& _contractName)
{
solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
if (!m_options.compiler.outputs.irOptimizedAstJson)
return;
if (!m_options.output.dir.empty())
createFile(
m_compiler->filesystemFriendlyName(_contractName) + "_opt_yul_ast.json",
util::jsonPrint(
m_compiler->yulIROptimizedAst(_contractName),
m_options.formatting.json
)
);
else
{
sout() << "Optimized IR AST:" << endl;
sout() << util::jsonPrint(
m_compiler->yulIROptimizedAst(_contractName),
m_options.formatting.json
) << endl;
}
}
void CommandLineInterface::handleBytecode(string const& _contract) void CommandLineInterface::handleBytecode(string const& _contract)
{ {
solAssert(CompilerInputModes.count(m_options.input.mode) == 1); solAssert(CompilerInputModes.count(m_options.input.mode) == 1);
@ -690,8 +743,12 @@ void CommandLineInterface::compile()
if (m_options.output.debugInfoSelection.has_value()) if (m_options.output.debugInfoSelection.has_value())
m_compiler->selectDebugInfo(m_options.output.debugInfoSelection.value()); m_compiler->selectDebugInfo(m_options.output.debugInfoSelection.value());
// TODO: Perhaps we should not compile unless requested // TODO: Perhaps we should not compile unless requested
m_compiler->enableIRGeneration(
m_compiler->enableIRGeneration(m_options.compiler.outputs.ir || m_options.compiler.outputs.irOptimized); m_options.compiler.outputs.ir ||
m_options.compiler.outputs.irOptimized ||
m_options.compiler.outputs.irAstJson ||
m_options.compiler.outputs.irOptimizedAstJson
);
m_compiler->enableEvmBytecodeGeneration( m_compiler->enableEvmBytecodeGeneration(
m_options.compiler.estimateGas || m_options.compiler.estimateGas ||
m_options.compiler.outputs.asm_ || m_options.compiler.outputs.asm_ ||
@ -1084,7 +1141,11 @@ void CommandLineInterface::assembleYul(yul::YulStack::Language _language, yul::Y
else else
serr() << "No binary representation found." << endl; serr() << "No binary representation found." << endl;
} }
if (m_options.compiler.outputs.astCompactJson)
{
sout() << "AST:" << endl << endl;
sout() << util::jsonPrint(stack.astJson(), m_options.formatting.json) << endl;
}
solAssert(_targetMachine == yul::YulStack::Machine::EVM, ""); solAssert(_targetMachine == yul::YulStack::Machine::EVM, "");
if (m_options.compiler.outputs.asm_) if (m_options.compiler.outputs.asm_)
{ {
@ -1141,7 +1202,9 @@ void CommandLineInterface::outputCompilationResults()
handleBytecode(contract); handleBytecode(contract);
handleIR(contract); handleIR(contract);
handleIRAst(contract);
handleIROptimized(contract); handleIROptimized(contract);
handleIROptimizedAst(contract);
handleSignatureHashes(contract); handleSignatureHashes(contract);
handleMetadata(contract); handleMetadata(contract);
handleABI(contract); handleABI(contract);

View File

@ -101,7 +101,9 @@ private:
void handleBinary(std::string const& _contract); void handleBinary(std::string const& _contract);
void handleOpcode(std::string const& _contract); void handleOpcode(std::string const& _contract);
void handleIR(std::string const& _contract); void handleIR(std::string const& _contract);
void handleIRAst(std::string const& _contract);
void handleIROptimized(std::string const& _contract); void handleIROptimized(std::string const& _contract);
void handleIROptimizedAst(std::string const& _contract);
void handleBytecode(std::string const& _contract); void handleBytecode(std::string const& _contract);
void handleSignatureHashes(std::string const& _contract); void handleSignatureHashes(std::string const& _contract);
void handleMetadata(std::string const& _contract); void handleMetadata(std::string const& _contract);

View File

@ -461,7 +461,8 @@ void CommandLineParser::parseOutputSelection()
static set<string> const assemblerModeOutputs = { static set<string> const assemblerModeOutputs = {
CompilerOutputs::componentName(&CompilerOutputs::asm_), CompilerOutputs::componentName(&CompilerOutputs::asm_),
CompilerOutputs::componentName(&CompilerOutputs::binary), CompilerOutputs::componentName(&CompilerOutputs::binary),
CompilerOutputs::componentName(&CompilerOutputs::irOptimized) CompilerOutputs::componentName(&CompilerOutputs::irOptimized),
CompilerOutputs::componentName(&CompilerOutputs::astCompactJson),
}; };
switch (_mode) switch (_mode)
@ -735,7 +736,9 @@ General Information)").c_str(),
(CompilerOutputs::componentName(&CompilerOutputs::binaryRuntime).c_str(), "Binary of the runtime part of the contracts in hex.") (CompilerOutputs::componentName(&CompilerOutputs::binaryRuntime).c_str(), "Binary of the runtime part of the contracts in hex.")
(CompilerOutputs::componentName(&CompilerOutputs::abi).c_str(), "ABI specification of the contracts.") (CompilerOutputs::componentName(&CompilerOutputs::abi).c_str(), "ABI specification of the contracts.")
(CompilerOutputs::componentName(&CompilerOutputs::ir).c_str(), "Intermediate Representation (IR) of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::ir).c_str(), "Intermediate Representation (IR) of all contracts.")
(CompilerOutputs::componentName(&CompilerOutputs::irOptimized).c_str(), "Optimized intermediate Representation (IR) of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::irAstJson).c_str(), "AST of Intermediate Representation (IR) of all contracts in a compact JSON format.")
(CompilerOutputs::componentName(&CompilerOutputs::irOptimized).c_str(), "Optimized Intermediate Representation (IR) of all contracts.")
(CompilerOutputs::componentName(&CompilerOutputs::irOptimizedAstJson).c_str(), "AST of optimized Intermediate Representation (IR) of all contracts in a compact JSON format.")
(CompilerOutputs::componentName(&CompilerOutputs::signatureHashes).c_str(), "Function signature hashes of the contracts.") (CompilerOutputs::componentName(&CompilerOutputs::signatureHashes).c_str(), "Function signature hashes of the contracts.")
(CompilerOutputs::componentName(&CompilerOutputs::natspecUser).c_str(), "Natspec user documentation of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::natspecUser).c_str(), "Natspec user documentation of all contracts.")
(CompilerOutputs::componentName(&CompilerOutputs::natspecDev).c_str(), "Natspec developer documentation of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::natspecDev).c_str(), "Natspec developer documentation of all contracts.")
@ -991,7 +994,9 @@ void CommandLineParser::processArgs()
array<string, 9> const conflictingWithStopAfter{ array<string, 9> const conflictingWithStopAfter{
CompilerOutputs::componentName(&CompilerOutputs::binary), CompilerOutputs::componentName(&CompilerOutputs::binary),
CompilerOutputs::componentName(&CompilerOutputs::ir), CompilerOutputs::componentName(&CompilerOutputs::ir),
CompilerOutputs::componentName(&CompilerOutputs::irAstJson),
CompilerOutputs::componentName(&CompilerOutputs::irOptimized), CompilerOutputs::componentName(&CompilerOutputs::irOptimized),
CompilerOutputs::componentName(&CompilerOutputs::irOptimizedAstJson),
g_strGas, g_strGas,
CompilerOutputs::componentName(&CompilerOutputs::asm_), CompilerOutputs::componentName(&CompilerOutputs::asm_),
CompilerOutputs::componentName(&CompilerOutputs::asmJson), CompilerOutputs::componentName(&CompilerOutputs::asmJson),

View File

@ -77,7 +77,9 @@ struct CompilerOutputs
{"bin-runtime", &CompilerOutputs::binaryRuntime}, {"bin-runtime", &CompilerOutputs::binaryRuntime},
{"abi", &CompilerOutputs::abi}, {"abi", &CompilerOutputs::abi},
{"ir", &CompilerOutputs::ir}, {"ir", &CompilerOutputs::ir},
{"ir-ast-json", &CompilerOutputs::irAstJson},
{"ir-optimized", &CompilerOutputs::irOptimized}, {"ir-optimized", &CompilerOutputs::irOptimized},
{"ir-optimized-ast-json", &CompilerOutputs::irOptimizedAstJson},
{"hashes", &CompilerOutputs::signatureHashes}, {"hashes", &CompilerOutputs::signatureHashes},
{"userdoc", &CompilerOutputs::natspecUser}, {"userdoc", &CompilerOutputs::natspecUser},
{"devdoc", &CompilerOutputs::natspecDev}, {"devdoc", &CompilerOutputs::natspecDev},
@ -95,7 +97,9 @@ struct CompilerOutputs
bool binaryRuntime = false; bool binaryRuntime = false;
bool abi = false; bool abi = false;
bool ir = false; bool ir = false;
bool irAstJson = false;
bool irOptimized = false; bool irOptimized = false;
bool irOptimizedAstJson = false;
bool signatureHashes = false; bool signatureHashes = false;
bool natspecUser = false; bool natspecUser = false;
bool natspecDev = false; bool natspecDev = false;

View File

@ -0,0 +1 @@
--ir-ast-json --ir-optimized-ast-json --optimize --pretty-json --json-indent 4

View File

@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {}

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@
{ {
"ast": "ast":
{ {
"nativeSrc": "0:1856:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "0:1856:1", "src": "0:1856:1",
"statements": "statements":
@ -16,11 +17,13 @@
{ {
"body": "body":
{ {
"nativeSrc": "47:35:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "47:35:1", "src": "47:35:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "57:19:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "57:19:1", "src": "57:19:1",
"value": "value":
@ -29,6 +32,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "73:2:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "73:2:1", "src": "73:2:1",
"type": "", "type": "",
@ -38,9 +42,11 @@
"functionName": "functionName":
{ {
"name": "mload", "name": "mload",
"nativeSrc": "67:5:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "67:5:1" "src": "67:5:1"
}, },
"nativeSrc": "67:9:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "67:9:1" "src": "67:9:1"
}, },
@ -48,6 +54,7 @@
[ [
{ {
"name": "memPtr", "name": "memPtr",
"nativeSrc": "57:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "57:6:1" "src": "57:6:1"
} }
@ -56,11 +63,13 @@
] ]
}, },
"name": "allocate_unbounded", "name": "allocate_unbounded",
"nativeSrc": "7:75:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"returnVariables": "returnVariables":
[ [
{ {
"name": "memPtr", "name": "memPtr",
"nativeSrc": "40:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "40:6:1", "src": "40:6:1",
"type": "" "type": ""
@ -71,6 +80,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "177:28:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "177:28:1", "src": "177:28:1",
"statements": "statements":
@ -82,6 +92,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "194:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "194:1:1", "src": "194:1:1",
"type": "", "type": "",
@ -89,6 +100,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "197:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "197:1:1", "src": "197:1:1",
"type": "", "type": "",
@ -98,24 +110,29 @@
"functionName": "functionName":
{ {
"name": "revert", "name": "revert",
"nativeSrc": "187:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "187:6:1" "src": "187:6:1"
}, },
"nativeSrc": "187:12:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "187:12:1" "src": "187:12:1"
}, },
"nativeSrc": "187:12:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "187:12:1" "src": "187:12:1"
} }
] ]
}, },
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "88:117:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "88:117:1" "src": "88:117:1"
}, },
{ {
"body": "body":
{ {
"nativeSrc": "300:28:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "300:28:1", "src": "300:28:1",
"statements": "statements":
@ -127,6 +144,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "317:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "317:1:1", "src": "317:1:1",
"type": "", "type": "",
@ -134,6 +152,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "320:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "320:1:1", "src": "320:1:1",
"type": "", "type": "",
@ -143,24 +162,29 @@
"functionName": "functionName":
{ {
"name": "revert", "name": "revert",
"nativeSrc": "310:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "310:6:1" "src": "310:6:1"
}, },
"nativeSrc": "310:12:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "310:12:1" "src": "310:12:1"
}, },
"nativeSrc": "310:12:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "310:12:1" "src": "310:12:1"
} }
] ]
}, },
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "211:117:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "211:117:1" "src": "211:117:1"
}, },
{ {
"body": "body":
{ {
"nativeSrc": "423:28:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "423:28:1", "src": "423:28:1",
"statements": "statements":
@ -172,6 +196,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "440:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "440:1:1", "src": "440:1:1",
"type": "", "type": "",
@ -179,6 +204,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "443:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "443:1:1", "src": "443:1:1",
"type": "", "type": "",
@ -188,24 +214,29 @@
"functionName": "functionName":
{ {
"name": "revert", "name": "revert",
"nativeSrc": "433:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "433:6:1" "src": "433:6:1"
}, },
"nativeSrc": "433:12:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "433:12:1" "src": "433:12:1"
}, },
"nativeSrc": "433:12:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "433:12:1" "src": "433:12:1"
} }
] ]
}, },
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "334:117:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "334:117:1" "src": "334:117:1"
}, },
{ {
"body": "body":
{ {
"nativeSrc": "546:28:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "546:28:1", "src": "546:28:1",
"statements": "statements":
@ -217,6 +248,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "563:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "563:1:1", "src": "563:1:1",
"type": "", "type": "",
@ -224,6 +256,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "566:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "566:1:1", "src": "566:1:1",
"type": "", "type": "",
@ -233,24 +266,29 @@
"functionName": "functionName":
{ {
"name": "revert", "name": "revert",
"nativeSrc": "556:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "556:6:1" "src": "556:6:1"
}, },
"nativeSrc": "556:12:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "556:12:1" "src": "556:12:1"
}, },
"nativeSrc": "556:12:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "556:12:1" "src": "556:12:1"
} }
] ]
}, },
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490", "name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "457:117:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "457:117:1" "src": "457:117:1"
}, },
{ {
"body": "body":
{ {
"nativeSrc": "669:28:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "669:28:1", "src": "669:28:1",
"statements": "statements":
@ -262,6 +300,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "686:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "686:1:1", "src": "686:1:1",
"type": "", "type": "",
@ -269,6 +308,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "689:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "689:1:1", "src": "689:1:1",
"type": "", "type": "",
@ -278,24 +318,29 @@
"functionName": "functionName":
{ {
"name": "revert", "name": "revert",
"nativeSrc": "679:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "679:6:1" "src": "679:6:1"
}, },
"nativeSrc": "679:12:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "679:12:1" "src": "679:12:1"
}, },
"nativeSrc": "679:12:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "679:12:1" "src": "679:12:1"
} }
] ]
}, },
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef", "name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "580:117:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "580:117:1" "src": "580:117:1"
}, },
{ {
"body": "body":
{ {
"nativeSrc": "810:478:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "810:478:1", "src": "810:478:1",
"statements": "statements":
@ -303,6 +348,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "859:83:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "859:83:1", "src": "859:83:1",
"statements": "statements":
@ -314,12 +360,15 @@
"functionName": "functionName":
{ {
"name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d", "name": "revert_error_1b9f4a0a5773e33b91aa01db23bf8c55fce1411167c872835e7fa00a4f17d46d",
"nativeSrc": "861:77:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "861:77:1" "src": "861:77:1"
}, },
"nativeSrc": "861:79:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "861:79:1" "src": "861:79:1"
}, },
"nativeSrc": "861:79:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "861:79:1" "src": "861:79:1"
} }
@ -337,11 +386,13 @@
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "838:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "838:6:1" "src": "838:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "846:4:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "846:4:1", "src": "846:4:1",
"type": "", "type": "",
@ -351,14 +402,17 @@
"functionName": "functionName":
{ {
"name": "add", "name": "add",
"nativeSrc": "834:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "834:3:1" "src": "834:3:1"
}, },
"nativeSrc": "834:17:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "834:17:1" "src": "834:17:1"
}, },
{ {
"name": "end", "name": "end",
"nativeSrc": "853:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "853:3:1" "src": "853:3:1"
} }
@ -366,9 +420,11 @@
"functionName": "functionName":
{ {
"name": "slt", "name": "slt",
"nativeSrc": "830:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "830:3:1" "src": "830:3:1"
}, },
"nativeSrc": "830:27:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "830:27:1" "src": "830:27:1"
} }
@ -376,16 +432,20 @@
"functionName": "functionName":
{ {
"name": "iszero", "name": "iszero",
"nativeSrc": "823:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "823:6:1" "src": "823:6:1"
}, },
"nativeSrc": "823:35:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "823:35:1" "src": "823:35:1"
}, },
"nativeSrc": "820:122:1",
"nodeType": "YulIf", "nodeType": "YulIf",
"src": "820:122:1" "src": "820:122:1"
}, },
{ {
"nativeSrc": "951:30:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "951:30:1", "src": "951:30:1",
"value": "value":
@ -394,6 +454,7 @@
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "974:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "974:6:1" "src": "974:6:1"
} }
@ -401,9 +462,11 @@
"functionName": "functionName":
{ {
"name": "calldataload", "name": "calldataload",
"nativeSrc": "961:12:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "961:12:1" "src": "961:12:1"
}, },
"nativeSrc": "961:20:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "961:20:1" "src": "961:20:1"
}, },
@ -411,6 +474,7 @@
[ [
{ {
"name": "length", "name": "length",
"nativeSrc": "951:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "951:6:1" "src": "951:6:1"
} }
@ -419,6 +483,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "1024:83:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1024:83:1", "src": "1024:83:1",
"statements": "statements":
@ -430,12 +495,15 @@
"functionName": "functionName":
{ {
"name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490", "name": "revert_error_15abf5612cd996bc235ba1e55a4a30ac60e6bb601ff7ba4ad3f179b6be8d0490",
"nativeSrc": "1026:77:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1026:77:1" "src": "1026:77:1"
}, },
"nativeSrc": "1026:79:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1026:79:1" "src": "1026:79:1"
}, },
"nativeSrc": "1026:79:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "1026:79:1" "src": "1026:79:1"
} }
@ -447,11 +515,13 @@
[ [
{ {
"name": "length", "name": "length",
"nativeSrc": "996:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "996:6:1" "src": "996:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1004:18:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1004:18:1", "src": "1004:18:1",
"type": "", "type": "",
@ -461,16 +531,20 @@
"functionName": "functionName":
{ {
"name": "gt", "name": "gt",
"nativeSrc": "993:2:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "993:2:1" "src": "993:2:1"
}, },
"nativeSrc": "993:30:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "993:30:1" "src": "993:30:1"
}, },
"nativeSrc": "990:117:1",
"nodeType": "YulIf", "nodeType": "YulIf",
"src": "990:117:1" "src": "990:117:1"
}, },
{ {
"nativeSrc": "1116:29:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "1116:29:1", "src": "1116:29:1",
"value": "value":
@ -479,11 +553,13 @@
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "1132:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1132:6:1" "src": "1132:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1140:4:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1140:4:1", "src": "1140:4:1",
"type": "", "type": "",
@ -493,9 +569,11 @@
"functionName": "functionName":
{ {
"name": "add", "name": "add",
"nativeSrc": "1128:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1128:3:1" "src": "1128:3:1"
}, },
"nativeSrc": "1128:17:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1128:17:1" "src": "1128:17:1"
}, },
@ -503,6 +581,7 @@
[ [
{ {
"name": "arrayPos", "name": "arrayPos",
"nativeSrc": "1116:8:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1116:8:1" "src": "1116:8:1"
} }
@ -511,6 +590,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "1199:83:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1199:83:1", "src": "1199:83:1",
"statements": "statements":
@ -522,12 +602,15 @@
"functionName": "functionName":
{ {
"name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef", "name": "revert_error_81385d8c0b31fffe14be1da910c8bd3a80be4cfa248e04f42ec0faea3132a8ef",
"nativeSrc": "1201:77:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1201:77:1" "src": "1201:77:1"
}, },
"nativeSrc": "1201:79:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1201:79:1" "src": "1201:79:1"
}, },
"nativeSrc": "1201:79:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "1201:79:1" "src": "1201:79:1"
} }
@ -542,6 +625,7 @@
[ [
{ {
"name": "arrayPos", "name": "arrayPos",
"nativeSrc": "1164:8:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1164:8:1" "src": "1164:8:1"
}, },
@ -550,11 +634,13 @@
[ [
{ {
"name": "length", "name": "length",
"nativeSrc": "1178:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1178:6:1" "src": "1178:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1186:4:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1186:4:1", "src": "1186:4:1",
"type": "", "type": "",
@ -564,9 +650,11 @@
"functionName": "functionName":
{ {
"name": "mul", "name": "mul",
"nativeSrc": "1174:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1174:3:1" "src": "1174:3:1"
}, },
"nativeSrc": "1174:17:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1174:17:1" "src": "1174:17:1"
} }
@ -574,14 +662,17 @@
"functionName": "functionName":
{ {
"name": "add", "name": "add",
"nativeSrc": "1160:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1160:3:1" "src": "1160:3:1"
}, },
"nativeSrc": "1160:32:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1160:32:1" "src": "1160:32:1"
}, },
{ {
"name": "end", "name": "end",
"nativeSrc": "1194:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1194:3:1" "src": "1194:3:1"
} }
@ -589,29 +680,35 @@
"functionName": "functionName":
{ {
"name": "gt", "name": "gt",
"nativeSrc": "1157:2:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1157:2:1" "src": "1157:2:1"
}, },
"nativeSrc": "1157:41:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1157:41:1" "src": "1157:41:1"
}, },
"nativeSrc": "1154:128:1",
"nodeType": "YulIf", "nodeType": "YulIf",
"src": "1154:128:1" "src": "1154:128:1"
} }
] ]
}, },
"name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr", "name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "720:568:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"parameters": "parameters":
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "777:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "777:6:1", "src": "777:6:1",
"type": "" "type": ""
}, },
{ {
"name": "end", "name": "end",
"nativeSrc": "785:3:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "785:3:1", "src": "785:3:1",
"type": "" "type": ""
@ -621,12 +718,14 @@
[ [
{ {
"name": "arrayPos", "name": "arrayPos",
"nativeSrc": "793:8:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "793:8:1", "src": "793:8:1",
"type": "" "type": ""
}, },
{ {
"name": "length", "name": "length",
"nativeSrc": "803:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "803:6:1", "src": "803:6:1",
"type": "" "type": ""
@ -637,6 +736,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "1395:458:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1395:458:1", "src": "1395:458:1",
"statements": "statements":
@ -644,6 +744,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "1441:83:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1441:83:1", "src": "1441:83:1",
"statements": "statements":
@ -655,12 +756,15 @@
"functionName": "functionName":
{ {
"name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b", "name": "revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b",
"nativeSrc": "1443:77:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1443:77:1" "src": "1443:77:1"
}, },
"nativeSrc": "1443:79:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1443:79:1" "src": "1443:79:1"
}, },
"nativeSrc": "1443:79:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "1443:79:1" "src": "1443:79:1"
} }
@ -675,11 +779,13 @@
[ [
{ {
"name": "dataEnd", "name": "dataEnd",
"nativeSrc": "1416:7:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1416:7:1" "src": "1416:7:1"
}, },
{ {
"name": "headStart", "name": "headStart",
"nativeSrc": "1425:9:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1425:9:1" "src": "1425:9:1"
} }
@ -687,14 +793,17 @@
"functionName": "functionName":
{ {
"name": "sub", "name": "sub",
"nativeSrc": "1412:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1412:3:1" "src": "1412:3:1"
}, },
"nativeSrc": "1412:23:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1412:23:1" "src": "1412:23:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1437:2:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1437:2:1", "src": "1437:2:1",
"type": "", "type": "",
@ -704,21 +813,26 @@
"functionName": "functionName":
{ {
"name": "slt", "name": "slt",
"nativeSrc": "1408:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1408:3:1" "src": "1408:3:1"
}, },
"nativeSrc": "1408:32:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1408:32:1" "src": "1408:32:1"
}, },
"nativeSrc": "1405:119:1",
"nodeType": "YulIf", "nodeType": "YulIf",
"src": "1405:119:1" "src": "1405:119:1"
}, },
{ {
"nativeSrc": "1534:312:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1534:312:1", "src": "1534:312:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "1549:45:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "1549:45:1", "src": "1549:45:1",
"value": "value":
@ -730,11 +844,13 @@
[ [
{ {
"name": "headStart", "name": "headStart",
"nativeSrc": "1580:9:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1580:9:1" "src": "1580:9:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1591:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1591:1:1", "src": "1591:1:1",
"type": "", "type": "",
@ -744,9 +860,11 @@
"functionName": "functionName":
{ {
"name": "add", "name": "add",
"nativeSrc": "1576:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1576:3:1" "src": "1576:3:1"
}, },
"nativeSrc": "1576:17:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1576:17:1" "src": "1576:17:1"
} }
@ -754,9 +872,11 @@
"functionName": "functionName":
{ {
"name": "calldataload", "name": "calldataload",
"nativeSrc": "1563:12:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1563:12:1" "src": "1563:12:1"
}, },
"nativeSrc": "1563:31:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1563:31:1" "src": "1563:31:1"
}, },
@ -764,6 +884,7 @@
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "1553:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "1553:6:1", "src": "1553:6:1",
"type": "" "type": ""
@ -773,6 +894,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "1641:83:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "1641:83:1", "src": "1641:83:1",
"statements": "statements":
@ -784,12 +906,15 @@
"functionName": "functionName":
{ {
"name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db", "name": "revert_error_c1322bf8034eace5e0b5c7295db60986aa89aae5e0ea0873e4689e076861a5db",
"nativeSrc": "1643:77:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1643:77:1" "src": "1643:77:1"
}, },
"nativeSrc": "1643:79:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1643:79:1" "src": "1643:79:1"
}, },
"nativeSrc": "1643:79:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "1643:79:1" "src": "1643:79:1"
} }
@ -801,11 +926,13 @@
[ [
{ {
"name": "offset", "name": "offset",
"nativeSrc": "1613:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1613:6:1" "src": "1613:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "1621:18:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "1621:18:1", "src": "1621:18:1",
"type": "", "type": "",
@ -815,16 +942,20 @@
"functionName": "functionName":
{ {
"name": "gt", "name": "gt",
"nativeSrc": "1610:2:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1610:2:1" "src": "1610:2:1"
}, },
"nativeSrc": "1610:30:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1610:30:1" "src": "1610:30:1"
}, },
"nativeSrc": "1607:117:1",
"nodeType": "YulIf", "nodeType": "YulIf",
"src": "1607:117:1" "src": "1607:117:1"
}, },
{ {
"nativeSrc": "1738:98:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "1738:98:1", "src": "1738:98:1",
"value": "value":
@ -836,11 +967,13 @@
[ [
{ {
"name": "headStart", "name": "headStart",
"nativeSrc": "1808:9:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1808:9:1" "src": "1808:9:1"
}, },
{ {
"name": "offset", "name": "offset",
"nativeSrc": "1819:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1819:6:1" "src": "1819:6:1"
} }
@ -848,14 +981,17 @@
"functionName": "functionName":
{ {
"name": "add", "name": "add",
"nativeSrc": "1804:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1804:3:1" "src": "1804:3:1"
}, },
"nativeSrc": "1804:22:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1804:22:1" "src": "1804:22:1"
}, },
{ {
"name": "dataEnd", "name": "dataEnd",
"nativeSrc": "1828:7:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1828:7:1" "src": "1828:7:1"
} }
@ -863,9 +999,11 @@
"functionName": "functionName":
{ {
"name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr", "name": "abi_decode_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "1756:47:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1756:47:1" "src": "1756:47:1"
}, },
"nativeSrc": "1756:80:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "1756:80:1" "src": "1756:80:1"
}, },
@ -873,11 +1011,13 @@
[ [
{ {
"name": "value0", "name": "value0",
"nativeSrc": "1738:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1738:6:1" "src": "1738:6:1"
}, },
{ {
"name": "value1", "name": "value1",
"nativeSrc": "1746:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "1746:6:1" "src": "1746:6:1"
} }
@ -888,17 +1028,20 @@
] ]
}, },
"name": "abi_decode_tuple_t_array$_t_uint256_$dyn_calldata_ptr", "name": "abi_decode_tuple_t_array$_t_uint256_$dyn_calldata_ptr",
"nativeSrc": "1294:559:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"parameters": "parameters":
[ [
{ {
"name": "headStart", "name": "headStart",
"nativeSrc": "1357:9:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "1357:9:1", "src": "1357:9:1",
"type": "" "type": ""
}, },
{ {
"name": "dataEnd", "name": "dataEnd",
"nativeSrc": "1368:7:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "1368:7:1", "src": "1368:7:1",
"type": "" "type": ""
@ -908,12 +1051,14 @@
[ [
{ {
"name": "value0", "name": "value0",
"nativeSrc": "1380:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "1380:6:1", "src": "1380:6:1",
"type": "" "type": ""
}, },
{ {
"name": "value1", "name": "value1",
"nativeSrc": "1388:6:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "1388:6:1", "src": "1388:6:1",
"type": "" "type": ""

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;
contract C {}

View File

@ -0,0 +1,9 @@
{
"language": "Solidity",
"sources": {
"C": {"urls": ["standard_irOptimized_ast_requested/in.sol"]}
},
"settings": {
"outputSelection": {"*": {"*": ["irOptimizedAst"]}}
}
}

View File

@ -0,0 +1,729 @@
{
"contracts":
{
"C":
{
"C":
{
"irOptimizedAst":
{
"code":
{
"block":
{
"nativeSrc": "44:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "241:15:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "469:43:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "483:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "499:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "493:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "493:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "483:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "429:83:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "462:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "611:36:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "632:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "635:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "625:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "522:125:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "726:59:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "699:86:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "899:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1147:77:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1165:44:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1198:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1203:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1194:3:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1194:15:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1165:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1094:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1128:5:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1138:8:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1278:51:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1296:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1312:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1306:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1306:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1296:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1238:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1271:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1432:44:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1457:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1460:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1450:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1343:133:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}
}
}
},
"sources":
{
"C":
{
"id": 0
}
}
}

View File

@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity *;
contract C {}

View File

@ -0,0 +1,9 @@
{
"language": "Solidity",
"sources": {
"C": {"urls": ["standard_ir_ast_requested/in.sol"]}
},
"settings": {
"outputSelection": {"*": {"*": ["irAst"]}}
}
}

View File

@ -0,0 +1,729 @@
{
"contracts":
{
"C":
{
"C":
{
"irAst":
{
"code":
{
"block":
{
"nativeSrc": "44:790:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "103:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "119:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "107:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "107:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "96:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "96:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "148:83:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "150:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "150:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"condition":
{
"arguments": [],
"functionName":
{
"name": "callvalue",
"nativeSrc": "136:9:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "136:11:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "133:98:0",
"nodeType": "YulIf",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "constructor_C_2",
"nativeSrc": "241:15:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "241:17:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"nativeSrc": "268:30:0",
"nodeType": "YulVariableDeclaration",
"src": "56:13:0",
"value":
{
"arguments": [],
"functionName":
{
"name": "allocate_unbounded",
"nativeSrc": "278:18:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "278:20:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variables":
[
{
"name": "_1",
"nativeSrc": "272:2:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "316:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "331:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "320:10:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "320:26:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "357:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "348:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "348:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "codecopy",
"nativeSrc": "307:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "307:66:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments":
[
{
"name": "_1",
"nativeSrc": "390:2:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
{
"arguments":
[
{
"hexValue": "435f325f6465706c6f796564",
"kind": "string",
"nativeSrc": "403:14:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "C_2_deployed"
}
],
"functionName":
{
"name": "datasize",
"nativeSrc": "394:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "394:24:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "return",
"nativeSrc": "383:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "383:36:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "469:43:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "483:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "499:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "493:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "493:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "483:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "429:83:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "462:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "611:36:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "632:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "635:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "625:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "625:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb",
"nativeSrc": "522:125:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "726:59:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements": []
},
"name": "constructor_C_2",
"nativeSrc": "699:86:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2",
"nodeType": "YulObject",
"subObjects":
[
{
"code":
{
"block":
{
"nativeSrc": "899:588:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "966:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
},
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "982:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "memoryguard",
"nativeSrc": "970:11:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "970:16:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "959:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "959:28:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1001:77:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1001:79:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1147:77:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1165:44:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1198:3:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "224"
},
{
"name": "value",
"nativeSrc": "1203:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
],
"functionName":
{
"name": "shr",
"nativeSrc": "1194:3:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1194:15:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "newValue",
"nativeSrc": "1165:8:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "shift_right_224_unsigned",
"nativeSrc": "1094:130:0",
"nodeType": "YulFunctionDefinition",
"parameters":
[
{
"name": "value",
"nativeSrc": "1128:5:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"returnVariables":
[
{
"name": "newValue",
"nativeSrc": "1138:8:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1278:51:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"nativeSrc": "1296:19:0",
"nodeType": "YulAssignment",
"src": "56:13:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1312:2:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "64"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "1306:5:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1306:9:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"variableNames":
[
{
"name": "memPtr",
"nativeSrc": "1296:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
}
]
}
]
},
"name": "allocate_unbounded",
"nativeSrc": "1238:91:0",
"nodeType": "YulFunctionDefinition",
"returnVariables":
[
{
"name": "memPtr",
"nativeSrc": "1271:6:0",
"nodeType": "YulTypedName",
"src": "56:13:0",
"type": ""
}
],
"src": "56:13:0"
},
{
"body":
{
"nativeSrc": "1432:44:0",
"nodeType": "YulBlock",
"src": "56:13:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "1457:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "1460:1:0",
"nodeType": "YulLiteral",
"src": "56:13:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "1450:6:0",
"nodeType": "YulIdentifier",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulFunctionCall",
"src": "56:13:0"
},
"nativeSrc": "1450:12:0",
"nodeType": "YulExpressionStatement",
"src": "56:13:0"
}
]
},
"name": "revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74",
"nativeSrc": "1343:133:0",
"nodeType": "YulFunctionDefinition",
"src": "56:13:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_2_deployed",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "<BYTECODE REMOVED>"
}
]
}
]
}
}
}
},
"sources":
{
"C":
{
"id": 0
}
}
}

View File

@ -50,5 +50,128 @@
" "
} }
} }
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
} }
} }

View File

@ -52,5 +52,135 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
" "
} }
} }
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "28:56:0",
"nodeType": "YulBlock",
"src": "28:56:0",
"statements":
[
{
"nativeSrc": "30:31:0",
"nodeType": "YulVariableDeclaration",
"src": "30:31:0",
"value":
{
"arguments":
[
{
"hexValue": "446174614e616d65",
"kind": "string",
"nativeSrc": "50:10:0",
"nodeType": "YulLiteral",
"src": "50:10:0",
"type": "",
"value": "DataName"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "39:10:0",
"nodeType": "YulIdentifier",
"src": "39:10:0"
},
"nativeSrc": "39:22:0",
"nodeType": "YulFunctionCall",
"src": "39:22:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "34:1:0",
"nodeType": "YulTypedName",
"src": "34:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "73:1:0",
"nodeType": "YulIdentifier",
"src": "73:1:0"
},
{
"kind": "number",
"nativeSrc": "76:1:0",
"nodeType": "YulLiteral",
"src": "76:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "69:3:0",
"nodeType": "YulIdentifier",
"src": "69:3:0"
},
"nativeSrc": "69:9:0",
"nodeType": "YulFunctionCall",
"src": "69:9:0"
},
{
"kind": "number",
"nativeSrc": "80:1:0",
"nodeType": "YulLiteral",
"src": "80:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "62:6:0",
"nodeType": "YulIdentifier",
"src": "62:6:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulFunctionCall",
"src": "62:20:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulExpressionStatement",
"src": "62:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "NamedObject",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "616263"
}
]
},
"id": 1
}
} }
} }

View File

@ -77,5 +77,190 @@ sub_0: assembly {
" "
} }
} }
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "28:56:0",
"nodeType": "YulBlock",
"src": "28:56:0",
"statements":
[
{
"nativeSrc": "30:31:0",
"nodeType": "YulVariableDeclaration",
"src": "30:31:0",
"value":
{
"arguments":
[
{
"hexValue": "446174614e616d65",
"kind": "string",
"nativeSrc": "50:10:0",
"nodeType": "YulLiteral",
"src": "50:10:0",
"type": "",
"value": "DataName"
}
],
"functionName":
{
"name": "dataoffset",
"nativeSrc": "39:10:0",
"nodeType": "YulIdentifier",
"src": "39:10:0"
},
"nativeSrc": "39:22:0",
"nodeType": "YulFunctionCall",
"src": "39:22:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "34:1:0",
"nodeType": "YulTypedName",
"src": "34:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "73:1:0",
"nodeType": "YulIdentifier",
"src": "73:1:0"
},
{
"kind": "number",
"nativeSrc": "76:1:0",
"nodeType": "YulLiteral",
"src": "76:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "69:3:0",
"nodeType": "YulIdentifier",
"src": "69:3:0"
},
"nativeSrc": "69:9:0",
"nodeType": "YulFunctionCall",
"src": "69:9:0"
},
{
"kind": "number",
"nativeSrc": "80:1:0",
"nodeType": "YulLiteral",
"src": "80:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "62:6:0",
"nodeType": "YulIdentifier",
"src": "62:6:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulFunctionCall",
"src": "62:20:0"
},
"nativeSrc": "62:20:0",
"nodeType": "YulExpressionStatement",
"src": "62:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "NamedObject",
"nodeType": "YulObject",
"subObjects":
[
{
"nodeType": "YulData",
"value": "616263"
},
{
"code":
{
"block":
{
"nativeSrc": "135:16:0",
"nodeType": "YulBlock",
"src": "135:16:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "144:1:0",
"nodeType": "YulLiteral",
"src": "144:1:0",
"type": "",
"value": "0"
},
{
"kind": "number",
"nativeSrc": "147:1:0",
"nodeType": "YulLiteral",
"src": "147:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "revert",
"nativeSrc": "137:6:0",
"nodeType": "YulIdentifier",
"src": "137:6:0"
},
"nativeSrc": "137:12:0",
"nodeType": "YulFunctionCall",
"src": "137:12:0"
},
"nativeSrc": "137:12:0",
"nodeType": "YulExpressionStatement",
"src": "137:12:0"
}
]
},
"nodeType": "YulCode"
},
"name": "OtherObject",
"nodeType": "YulObject",
"subObjects": []
}
]
},
"id": 1
}
} }
} }

View File

@ -45,5 +45,128 @@
" "
} }
} }
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
} }
} }

View File

@ -40,5 +40,128 @@
" "
} }
} }
},
"sources":
{
"A":
{
"ast":
{
"code":
{
"block":
{
"nativeSrc": "0:42:0",
"nodeType": "YulBlock",
"src": "0:42:0",
"statements":
[
{
"nativeSrc": "2:17:0",
"nodeType": "YulVariableDeclaration",
"src": "2:17:0",
"value":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "17:1:0",
"nodeType": "YulLiteral",
"src": "17:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "mload",
"nativeSrc": "11:5:0",
"nodeType": "YulIdentifier",
"src": "11:5:0"
},
"nativeSrc": "11:8:0",
"nodeType": "YulFunctionCall",
"src": "11:8:0"
},
"variables":
[
{
"name": "x",
"nativeSrc": "6:1:0",
"nodeType": "YulTypedName",
"src": "6:1:0",
"type": ""
}
]
},
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"name": "x",
"nativeSrc": "31:1:0",
"nodeType": "YulIdentifier",
"src": "31:1:0"
},
{
"kind": "number",
"nativeSrc": "34:1:0",
"nodeType": "YulLiteral",
"src": "34:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "add",
"nativeSrc": "27:3:0",
"nodeType": "YulIdentifier",
"src": "27:3:0"
},
"nativeSrc": "27:9:0",
"nodeType": "YulFunctionCall",
"src": "27:9:0"
},
{
"kind": "number",
"nativeSrc": "38:1:0",
"nodeType": "YulLiteral",
"src": "38:1:0",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sstore",
"nativeSrc": "20:6:0",
"nodeType": "YulIdentifier",
"src": "20:6:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulFunctionCall",
"src": "20:20:0"
},
"nativeSrc": "20:20:0",
"nodeType": "YulExpressionStatement",
"src": "20:20:0"
}
]
},
"nodeType": "YulCode"
},
"name": "object",
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
}
} }
} }

View File

@ -0,0 +1 @@
--strict-assembly --ast-compact-json --pretty-json --json-indent 4

View File

@ -0,0 +1,15 @@
/// @use-src 0:"input.sol"
object "C_6_deployed" {
code {
/// @src 0:60:101 "contract C {..."
mstore(64, 128)
// f()
fun_f_5()
/// @src 0:77:99 "function f() public {}"
function fun_f_5() {
}
/// @src 0:60:101 "contract C {..."
}
}

View File

@ -0,0 +1,91 @@
======= strict_asm_ast_compact_json/input.yul (EVM) =======
AST:
{
"code":
{
"block":
{
"nativeSrc": "60:246:0",
"nodeType": "YulBlock",
"src": "-1:-1:0",
"statements":
[
{
"expression":
{
"arguments":
[
{
"kind": "number",
"nativeSrc": "122:2:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "64"
},
{
"kind": "number",
"nativeSrc": "126:3:0",
"nodeType": "YulLiteral",
"src": "60:41:0",
"type": "",
"value": "128"
}
],
"functionName":
{
"name": "mstore",
"nativeSrc": "115:6:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "115:15:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "fun_f_5",
"nativeSrc": "155:7:0",
"nodeType": "YulIdentifier",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulFunctionCall",
"src": "60:41:0"
},
"nativeSrc": "155:9:0",
"nodeType": "YulExpressionStatement",
"src": "60:41:0"
},
{
"body":
{
"nativeSrc": "244:11:0",
"nodeType": "YulBlock",
"src": "77:22:0",
"statements": []
},
"name": "fun_f_5",
"nativeSrc": "225:30:0",
"nodeType": "YulFunctionDefinition",
"src": "77:22:0"
}
]
},
"nodeType": "YulCode"
},
"name": "C_6_deployed",
"nodeType": "YulObject",
"subObjects": []
}

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:34:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:34:1", "src": "56:34:1",
"statements": "statements":
@ -53,6 +54,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "67:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "67:1:1", "src": "67:1:1",
"type": "", "type": "",
@ -60,6 +62,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
@ -67,6 +70,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "73:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "73:1:1", "src": "73:1:1",
"type": "", "type": "",
@ -74,6 +78,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "76:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "76:1:1", "src": "76:1:1",
"type": "", "type": "",
@ -81,6 +86,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "79:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "79:1:1", "src": "79:1:1",
"type": "", "type": "",
@ -88,6 +94,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "82:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "82:1:1", "src": "82:1:1",
"type": "", "type": "",
@ -95,6 +102,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "85:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "85:1:1", "src": "85:1:1",
"type": "", "type": "",
@ -104,9 +112,11 @@
"functionName": "functionName":
{ {
"name": "call", "name": "call",
"nativeSrc": "62:4:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "62:4:1" "src": "62:4:1"
}, },
"nativeSrc": "62:25:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "62:25:1" "src": "62:25:1"
} }
@ -114,12 +124,15 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "58:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "58:3:1" "src": "58:3:1"
}, },
"nativeSrc": "58:30:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "58:30:1" "src": "58:30:1"
}, },
"nativeSrc": "58:30:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "58:30:1" "src": "58:30:1"
} }

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:34:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:34:1", "src": "56:34:1",
"statements": "statements":
@ -40,6 +41,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "67:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "67:1:1", "src": "67:1:1",
"type": "", "type": "",
@ -47,6 +49,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
@ -54,6 +57,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "73:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "73:1:1", "src": "73:1:1",
"type": "", "type": "",
@ -61,6 +65,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "76:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "76:1:1", "src": "76:1:1",
"type": "", "type": "",
@ -68,6 +73,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "79:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "79:1:1", "src": "79:1:1",
"type": "", "type": "",
@ -75,6 +81,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "82:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "82:1:1", "src": "82:1:1",
"type": "", "type": "",
@ -82,6 +89,7 @@
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "85:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "85:1:1", "src": "85:1:1",
"type": "", "type": "",
@ -91,9 +99,11 @@
"functionName": "functionName":
{ {
"name": "call", "name": "call",
"nativeSrc": "62:4:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "62:4:1" "src": "62:4:1"
}, },
"nativeSrc": "62:25:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "62:25:1" "src": "62:25:1"
} }
@ -101,12 +111,15 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "58:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "58:3:1" "src": "58:3:1"
}, },
"nativeSrc": "58:30:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "58:30:1" "src": "58:30:1"
}, },
"nativeSrc": "58:30:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "58:30:1" "src": "58:30:1"
} }

View File

@ -39,11 +39,13 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:6:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:6:1", "src": "61:6:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "63:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "63:2:1", "src": "63:2:1",
"statements": [] "statements": []

View File

@ -26,11 +26,13 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:6:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:6:1", "src": "61:6:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "63:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "63:2:1", "src": "63:2:1",
"statements": [] "statements": []

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:43:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:43:1", "src": "61:43:1",
"statements": "statements":
@ -46,6 +47,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "76:22:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "76:22:1", "src": "76:22:1",
"statements": "statements":
@ -60,6 +62,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "92:2:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "92:2:1", "src": "92:2:1",
"type": "", "type": "",
@ -69,9 +72,11 @@
"functionName": "functionName":
{ {
"name": "blockhash", "name": "blockhash",
"nativeSrc": "82:9:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "82:9:1" "src": "82:9:1"
}, },
"nativeSrc": "82:13:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "82:13:1" "src": "82:13:1"
} }
@ -79,18 +84,22 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "78:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "78:3:1" "src": "78:3:1"
}, },
"nativeSrc": "78:18:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "78:18:1" "src": "78:18:1"
}, },
"nativeSrc": "78:18:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "78:18:1" "src": "78:18:1"
} }
] ]
}, },
"name": "g", "name": "g",
"nativeSrc": "63:35:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "63:35:1" "src": "63:35:1"
}, },
@ -101,12 +110,15 @@
"functionName": "functionName":
{ {
"name": "g", "name": "g",
"nativeSrc": "99:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "99:1:1" "src": "99:1:1"
}, },
"nativeSrc": "99:3:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "99:3:1" "src": "99:3:1"
}, },
"nativeSrc": "99:3:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "99:3:1" "src": "99:3:1"
} }

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:43:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:43:1", "src": "61:43:1",
"statements": "statements":
@ -33,6 +34,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "76:22:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "76:22:1", "src": "76:22:1",
"statements": "statements":
@ -47,6 +49,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "92:2:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "92:2:1", "src": "92:2:1",
"type": "", "type": "",
@ -56,9 +59,11 @@
"functionName": "functionName":
{ {
"name": "blockhash", "name": "blockhash",
"nativeSrc": "82:9:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "82:9:1" "src": "82:9:1"
}, },
"nativeSrc": "82:13:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "82:13:1" "src": "82:13:1"
} }
@ -66,18 +71,22 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "78:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "78:3:1" "src": "78:3:1"
}, },
"nativeSrc": "78:18:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "78:18:1" "src": "78:18:1"
}, },
"nativeSrc": "78:18:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "78:18:1" "src": "78:18:1"
} }
] ]
}, },
"name": "g", "name": "g",
"nativeSrc": "63:35:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "63:35:1" "src": "63:35:1"
}, },
@ -88,12 +97,15 @@
"functionName": "functionName":
{ {
"name": "g", "name": "g",
"nativeSrc": "99:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "99:1:1" "src": "99:1:1"
}, },
"nativeSrc": "99:3:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "99:3:1" "src": "99:3:1"
}, },
"nativeSrc": "99:3:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "99:3:1" "src": "99:3:1"
} }

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:26:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:26:1", "src": "56:26:1",
"statements": "statements":
@ -46,17 +47,20 @@
{ {
"body": "body":
{ {
"nativeSrc": "71:9:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "71:9:1", "src": "71:9:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "73:5:1",
"nodeType": "YulLeave", "nodeType": "YulLeave",
"src": "73:5:1" "src": "73:5:1"
} }
] ]
}, },
"name": "f", "name": "f",
"nativeSrc": "58:22:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "58:22:1" "src": "58:22:1"
} }

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:26:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:26:1", "src": "56:26:1",
"statements": "statements":
@ -33,17 +34,20 @@
{ {
"body": "body":
{ {
"nativeSrc": "71:9:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "71:9:1", "src": "71:9:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "73:5:1",
"nodeType": "YulLeave", "nodeType": "YulLeave",
"src": "73:5:1" "src": "73:5:1"
} }
] ]
}, },
"name": "f", "name": "f",
"nativeSrc": "58:22:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "58:22:1" "src": "58:22:1"
} }

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:49:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:49:1", "src": "61:49:1",
"statements": "statements":
@ -46,15 +47,18 @@
{ {
"body": "body":
{ {
"nativeSrc": "90:18:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "90:18:1", "src": "90:18:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "92:5:1",
"nodeType": "YulBreak", "nodeType": "YulBreak",
"src": "92:5:1" "src": "92:5:1"
}, },
{ {
"nativeSrc": "98:8:1",
"nodeType": "YulContinue", "nodeType": "YulContinue",
"src": "98:8:1" "src": "98:8:1"
} }
@ -63,14 +67,17 @@
"condition": "condition":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
"value": "1" "value": "1"
}, },
"nativeSrc": "63:45:1",
"nodeType": "YulForLoop", "nodeType": "YulForLoop",
"post": "post":
{ {
"nativeSrc": "72:17:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "72:17:1", "src": "72:17:1",
"statements": "statements":
@ -85,6 +92,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -94,9 +102,11 @@
"functionName": "functionName":
{ {
"name": "sload", "name": "sload",
"nativeSrc": "78:5:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "78:5:1" "src": "78:5:1"
}, },
"nativeSrc": "78:8:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "78:8:1" "src": "78:8:1"
} }
@ -104,12 +114,15 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "74:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "74:3:1" "src": "74:3:1"
}, },
"nativeSrc": "74:13:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "74:13:1" "src": "74:13:1"
}, },
"nativeSrc": "74:13:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "74:13:1" "src": "74:13:1"
} }
@ -117,6 +130,7 @@
}, },
"pre": "pre":
{ {
"nativeSrc": "67:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "67:2:1", "src": "67:2:1",
"statements": [] "statements": []

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:49:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:49:1", "src": "61:49:1",
"statements": "statements":
@ -33,15 +34,18 @@
{ {
"body": "body":
{ {
"nativeSrc": "90:18:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "90:18:1", "src": "90:18:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "92:5:1",
"nodeType": "YulBreak", "nodeType": "YulBreak",
"src": "92:5:1" "src": "92:5:1"
}, },
{ {
"nativeSrc": "98:8:1",
"nodeType": "YulContinue", "nodeType": "YulContinue",
"src": "98:8:1" "src": "98:8:1"
} }
@ -50,14 +54,17 @@
"condition": "condition":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
"value": "1" "value": "1"
}, },
"nativeSrc": "63:45:1",
"nodeType": "YulForLoop", "nodeType": "YulForLoop",
"post": "post":
{ {
"nativeSrc": "72:17:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "72:17:1", "src": "72:17:1",
"statements": "statements":
@ -72,6 +79,7 @@
[ [
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -81,9 +89,11 @@
"functionName": "functionName":
{ {
"name": "sload", "name": "sload",
"nativeSrc": "78:5:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "78:5:1" "src": "78:5:1"
}, },
"nativeSrc": "78:8:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "78:8:1" "src": "78:8:1"
} }
@ -91,12 +101,15 @@
"functionName": "functionName":
{ {
"name": "pop", "name": "pop",
"nativeSrc": "74:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "74:3:1" "src": "74:3:1"
}, },
"nativeSrc": "74:13:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "74:13:1" "src": "74:13:1"
}, },
"nativeSrc": "74:13:1",
"nodeType": "YulExpressionStatement", "nodeType": "YulExpressionStatement",
"src": "74:13:1" "src": "74:13:1"
} }
@ -104,6 +117,7 @@
}, },
"pre": "pre":
{ {
"nativeSrc": "67:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "67:2:1", "src": "67:2:1",
"statements": [] "statements": []

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "72:76:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "72:76:1", "src": "72:76:1",
"statements": "statements":
@ -46,6 +47,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "94:35:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "94:35:1", "src": "94:35:1",
"statements": "statements":
@ -53,26 +55,31 @@
{ {
"body": "body":
{ {
"nativeSrc": "118:3:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "118:3:1", "src": "118:3:1",
"statements": [] "statements": []
}, },
"name": "f2", "name": "f2",
"nativeSrc": "104:17:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "104:17:1" "src": "104:17:1"
} }
] ]
}, },
"name": "f1", "name": "f1",
"nativeSrc": "80:49:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "80:49:1" "src": "80:49:1"
}, },
{ {
"nativeSrc": "136:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "136:6:1", "src": "136:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "141:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "141:1:1", "src": "141:1:1",
"type": "", "type": "",
@ -82,6 +89,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "136:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "136:1:1" "src": "136:1:1"
} }

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "72:76:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "72:76:1", "src": "72:76:1",
"statements": "statements":
@ -33,6 +34,7 @@
{ {
"body": "body":
{ {
"nativeSrc": "94:35:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "94:35:1", "src": "94:35:1",
"statements": "statements":
@ -40,26 +42,31 @@
{ {
"body": "body":
{ {
"nativeSrc": "118:3:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "118:3:1", "src": "118:3:1",
"statements": [] "statements": []
}, },
"name": "f2", "name": "f2",
"nativeSrc": "104:17:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "104:17:1" "src": "104:17:1"
} }
] ]
}, },
"name": "f1", "name": "f1",
"nativeSrc": "80:49:1",
"nodeType": "YulFunctionDefinition", "nodeType": "YulFunctionDefinition",
"src": "80:49:1" "src": "80:49:1"
}, },
{ {
"nativeSrc": "136:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "136:6:1", "src": "136:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "141:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "141:1:1", "src": "141:1:1",
"type": "", "type": "",
@ -69,6 +76,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "136:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "136:1:1" "src": "136:1:1"
} }

View File

@ -124,16 +124,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "95:45:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "95:45:1", "src": "95:45:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "97:17:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "97:17:1", "src": "97:17:1",
"value": "value":
{ {
"name": "s.offset", "name": "s.offset",
"nativeSrc": "106:8:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "106:8:1" "src": "106:8:1"
}, },
@ -141,6 +144,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "101:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "101:1:1", "src": "101:1:1",
"type": "" "type": ""
@ -148,6 +152,7 @@
] ]
}, },
{ {
"nativeSrc": "115:23:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "115:23:1", "src": "115:23:1",
"value": "value":
@ -156,11 +161,13 @@
[ [
{ {
"name": "s.slot", "name": "s.slot",
"nativeSrc": "128:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "128:6:1" "src": "128:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "136:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "136:1:1", "src": "136:1:1",
"type": "", "type": "",
@ -170,9 +177,11 @@
"functionName": "functionName":
{ {
"name": "mul", "name": "mul",
"nativeSrc": "124:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "124:3:1" "src": "124:3:1"
}, },
"nativeSrc": "124:14:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "124:14:1" "src": "124:14:1"
}, },
@ -180,6 +189,7 @@
[ [
{ {
"name": "y", "name": "y",
"nativeSrc": "119:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "119:1:1", "src": "119:1:1",
"type": "" "type": ""

View File

@ -89,16 +89,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "95:45:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "95:45:1", "src": "95:45:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "97:17:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "97:17:1", "src": "97:17:1",
"value": "value":
{ {
"name": "s.offset", "name": "s.offset",
"nativeSrc": "106:8:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "106:8:1" "src": "106:8:1"
}, },
@ -106,6 +109,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "101:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "101:1:1", "src": "101:1:1",
"type": "" "type": ""
@ -113,6 +117,7 @@
] ]
}, },
{ {
"nativeSrc": "115:23:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "115:23:1", "src": "115:23:1",
"value": "value":
@ -121,11 +126,13 @@
[ [
{ {
"name": "s.slot", "name": "s.slot",
"nativeSrc": "128:6:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "128:6:1" "src": "128:6:1"
}, },
{ {
"kind": "number", "kind": "number",
"nativeSrc": "136:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "136:1:1", "src": "136:1:1",
"type": "", "type": "",
@ -135,9 +142,11 @@
"functionName": "functionName":
{ {
"name": "mul", "name": "mul",
"nativeSrc": "124:3:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "124:3:1" "src": "124:3:1"
}, },
"nativeSrc": "124:14:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "124:14:1" "src": "124:14:1"
}, },
@ -145,6 +154,7 @@
[ [
{ {
"name": "y", "name": "y",
"nativeSrc": "119:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "119:1:1", "src": "119:1:1",
"type": "" "type": ""

View File

@ -39,17 +39,20 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:18:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:18:1", "src": "56:18:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "58:14:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "58:14:1", "src": "58:14:1",
"value": "value":
{ {
"hexValue": "616263", "hexValue": "616263",
"kind": "string", "kind": "string",
"nativeSrc": "67:5:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "67:5:1", "src": "67:5:1",
"type": "", "type": "",
@ -59,6 +62,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "62:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "62:1:1", "src": "62:1:1",
"type": "" "type": ""

View File

@ -26,17 +26,20 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "56:18:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "56:18:1", "src": "56:18:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "58:14:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "58:14:1", "src": "58:14:1",
"value": "value":
{ {
"hexValue": "616263", "hexValue": "616263",
"kind": "string", "kind": "string",
"nativeSrc": "67:5:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "67:5:1", "src": "67:5:1",
"type": "", "type": "",
@ -46,6 +49,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "62:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "62:1:1", "src": "62:1:1",
"type": "" "type": ""

View File

@ -39,16 +39,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:129:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:129:1", "src": "61:129:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "75:10:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "75:10:1", "src": "75:10:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -58,6 +61,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "79:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "79:1:1", "src": "79:1:1",
"type": "" "type": ""
@ -70,16 +74,19 @@
{ {
"body": "body":
{ {
"nativeSrc": "139:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "139:10:1", "src": "139:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "141:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "141:6:1", "src": "141:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "146:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "146:1:1", "src": "146:1:1",
"type": "", "type": "",
@ -89,6 +96,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "141:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "141:1:1" "src": "141:1:1"
} }
@ -96,11 +104,13 @@
} }
] ]
}, },
"nativeSrc": "132:17:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "132:17:1", "src": "132:17:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "137:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "137:1:1", "src": "137:1:1",
"type": "", "type": "",
@ -110,16 +120,19 @@
{ {
"body": "body":
{ {
"nativeSrc": "170:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "170:10:1", "src": "170:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "172:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "172:6:1", "src": "172:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "177:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "177:1:1", "src": "177:1:1",
"type": "", "type": "",
@ -129,6 +142,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "172:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "172:1:1" "src": "172:1:1"
} }
@ -136,6 +150,7 @@
} }
] ]
}, },
"nativeSrc": "162:18:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "162:18:1", "src": "162:18:1",
"value": "default" "value": "default"
@ -147,12 +162,15 @@
"functionName": "functionName":
{ {
"name": "calldatasize", "name": "calldatasize",
"nativeSrc": "105:12:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "105:12:1" "src": "105:12:1"
}, },
"nativeSrc": "105:14:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "105:14:1" "src": "105:14:1"
}, },
"nativeSrc": "98:82:1",
"nodeType": "YulSwitch", "nodeType": "YulSwitch",
"src": "98:82:1" "src": "98:82:1"
} }

View File

@ -39,6 +39,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:33:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:33:1", "src": "61:33:1",
"statements": "statements":
@ -49,15 +50,18 @@
{ {
"body": "body":
{ {
"nativeSrc": "79:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "79:2:1", "src": "79:2:1",
"statements": [] "statements": []
}, },
"nativeSrc": "72:9:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "72:9:1", "src": "72:9:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "77:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "77:1:1", "src": "77:1:1",
"type": "", "type": "",
@ -67,10 +71,12 @@
{ {
"body": "body":
{ {
"nativeSrc": "90:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "90:2:1", "src": "90:2:1",
"statements": [] "statements": []
}, },
"nativeSrc": "82:10:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "82:10:1", "src": "82:10:1",
"value": "default" "value": "default"
@ -79,11 +85,13 @@
"expression": "expression":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
"value": "0" "value": "0"
}, },
"nativeSrc": "63:29:1",
"nodeType": "YulSwitch", "nodeType": "YulSwitch",
"src": "63:29:1" "src": "63:29:1"
} }

View File

@ -26,6 +26,7 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:33:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:33:1", "src": "61:33:1",
"statements": "statements":
@ -36,15 +37,18 @@
{ {
"body": "body":
{ {
"nativeSrc": "79:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "79:2:1", "src": "79:2:1",
"statements": [] "statements": []
}, },
"nativeSrc": "72:9:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "72:9:1", "src": "72:9:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "77:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "77:1:1", "src": "77:1:1",
"type": "", "type": "",
@ -54,10 +58,12 @@
{ {
"body": "body":
{ {
"nativeSrc": "90:2:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "90:2:1", "src": "90:2:1",
"statements": [] "statements": []
}, },
"nativeSrc": "82:10:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "82:10:1", "src": "82:10:1",
"value": "default" "value": "default"
@ -66,11 +72,13 @@
"expression": "expression":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "70:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "70:1:1", "src": "70:1:1",
"type": "", "type": "",
"value": "0" "value": "0"
}, },
"nativeSrc": "63:29:1",
"nodeType": "YulSwitch", "nodeType": "YulSwitch",
"src": "63:29:1" "src": "63:29:1"
} }

View File

@ -26,16 +26,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "61:129:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "61:129:1", "src": "61:129:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "75:10:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "75:10:1", "src": "75:10:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -45,6 +48,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "79:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "79:1:1", "src": "79:1:1",
"type": "" "type": ""
@ -57,16 +61,19 @@
{ {
"body": "body":
{ {
"nativeSrc": "139:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "139:10:1", "src": "139:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "141:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "141:6:1", "src": "141:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "146:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "146:1:1", "src": "146:1:1",
"type": "", "type": "",
@ -76,6 +83,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "141:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "141:1:1" "src": "141:1:1"
} }
@ -83,11 +91,13 @@
} }
] ]
}, },
"nativeSrc": "132:17:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "132:17:1", "src": "132:17:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "137:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "137:1:1", "src": "137:1:1",
"type": "", "type": "",
@ -97,16 +107,19 @@
{ {
"body": "body":
{ {
"nativeSrc": "170:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "170:10:1", "src": "170:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "172:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "172:6:1", "src": "172:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "177:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "177:1:1", "src": "177:1:1",
"type": "", "type": "",
@ -116,6 +129,7 @@
[ [
{ {
"name": "v", "name": "v",
"nativeSrc": "172:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "172:1:1" "src": "172:1:1"
} }
@ -123,6 +137,7 @@
} }
] ]
}, },
"nativeSrc": "162:18:1",
"nodeType": "YulCase", "nodeType": "YulCase",
"src": "162:18:1", "src": "162:18:1",
"value": "default" "value": "default"
@ -134,12 +149,15 @@
"functionName": "functionName":
{ {
"name": "calldatasize", "name": "calldatasize",
"nativeSrc": "105:12:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "105:12:1" "src": "105:12:1"
}, },
"nativeSrc": "105:14:1",
"nodeType": "YulFunctionCall", "nodeType": "YulFunctionCall",
"src": "105:14:1" "src": "105:14:1"
}, },
"nativeSrc": "98:82:1",
"nodeType": "YulSwitch", "nodeType": "YulSwitch",
"src": "98:82:1" "src": "98:82:1"
} }

View File

@ -81,16 +81,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "77:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "77:10:1", "src": "77:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "79:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "79:6:1", "src": "79:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -100,6 +103,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "79:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "79:1:1" "src": "79:1:1"
} }

View File

@ -59,16 +59,19 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "77:10:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "77:10:1", "src": "77:10:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "79:6:1",
"nodeType": "YulAssignment", "nodeType": "YulAssignment",
"src": "79:6:1", "src": "79:6:1",
"value": "value":
{ {
"kind": "number", "kind": "number",
"nativeSrc": "84:1:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "84:1:1", "src": "84:1:1",
"type": "", "type": "",
@ -78,6 +81,7 @@
[ [
{ {
"name": "x", "name": "x",
"nativeSrc": "79:1:1",
"nodeType": "YulIdentifier", "nodeType": "YulIdentifier",
"src": "79:1:1" "src": "79:1:1"
} }

View File

@ -39,17 +39,20 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "66:142:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "66:142:1", "src": "66:142:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "80:15:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "80:15:1", "src": "80:15:1",
"value": "value":
{ {
"hexValue": "74657374", "hexValue": "74657374",
"kind": "string", "kind": "string",
"nativeSrc": "89:6:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "89:6:1", "src": "89:6:1",
"type": "", "type": "",
@ -59,6 +62,7 @@
[ [
{ {
"name": "a", "name": "a",
"nativeSrc": "84:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "84:1:1", "src": "84:1:1",
"type": "" "type": ""
@ -66,12 +70,14 @@
] ]
}, },
{ {
"nativeSrc": "108:54:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "108:54:1", "src": "108:54:1",
"value": "value":
{ {
"hexValue": "112233445566778899aabbccddeeff6677889900", "hexValue": "112233445566778899aabbccddeeff6677889900",
"kind": "string", "kind": "string",
"nativeSrc": "117:45:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "117:45:1", "src": "117:45:1",
"type": "" "type": ""
@ -80,6 +86,7 @@
[ [
{ {
"name": "b", "name": "b",
"nativeSrc": "112:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "112:1:1", "src": "112:1:1",
"type": "" "type": ""
@ -87,12 +94,14 @@
] ]
}, },
{ {
"nativeSrc": "175:23:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "175:23:1", "src": "175:23:1",
"value": "value":
{ {
"hexValue": "1234abcd", "hexValue": "1234abcd",
"kind": "string", "kind": "string",
"nativeSrc": "184:14:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "184:14:1", "src": "184:14:1",
"type": "" "type": ""
@ -101,6 +110,7 @@
[ [
{ {
"name": "c", "name": "c",
"nativeSrc": "179:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "179:1:1", "src": "179:1:1",
"type": "" "type": ""

View File

@ -26,17 +26,20 @@
{ {
"AST": "AST":
{ {
"nativeSrc": "66:142:1",
"nodeType": "YulBlock", "nodeType": "YulBlock",
"src": "66:142:1", "src": "66:142:1",
"statements": "statements":
[ [
{ {
"nativeSrc": "80:15:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "80:15:1", "src": "80:15:1",
"value": "value":
{ {
"hexValue": "74657374", "hexValue": "74657374",
"kind": "string", "kind": "string",
"nativeSrc": "89:6:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "89:6:1", "src": "89:6:1",
"type": "", "type": "",
@ -46,6 +49,7 @@
[ [
{ {
"name": "a", "name": "a",
"nativeSrc": "84:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "84:1:1", "src": "84:1:1",
"type": "" "type": ""
@ -53,12 +57,14 @@
] ]
}, },
{ {
"nativeSrc": "108:54:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "108:54:1", "src": "108:54:1",
"value": "value":
{ {
"hexValue": "112233445566778899aabbccddeeff6677889900", "hexValue": "112233445566778899aabbccddeeff6677889900",
"kind": "string", "kind": "string",
"nativeSrc": "117:45:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "117:45:1", "src": "117:45:1",
"type": "" "type": ""
@ -67,6 +73,7 @@
[ [
{ {
"name": "b", "name": "b",
"nativeSrc": "112:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "112:1:1", "src": "112:1:1",
"type": "" "type": ""
@ -74,12 +81,14 @@
] ]
}, },
{ {
"nativeSrc": "175:23:1",
"nodeType": "YulVariableDeclaration", "nodeType": "YulVariableDeclaration",
"src": "175:23:1", "src": "175:23:1",
"value": "value":
{ {
"hexValue": "1234abcd", "hexValue": "1234abcd",
"kind": "string", "kind": "string",
"nativeSrc": "184:14:1",
"nodeType": "YulLiteral", "nodeType": "YulLiteral",
"src": "184:14:1", "src": "184:14:1",
"type": "" "type": ""
@ -88,6 +97,7 @@
[ [
{ {
"name": "c", "name": "c",
"nativeSrc": "179:1:1",
"nodeType": "YulTypedName", "nodeType": "YulTypedName",
"src": "179:1:1", "src": "179:1:1",
"type": "" "type": ""

View File

@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
"dir1/file1.sol:L=0x1234567890123456789012345678901234567890," "dir1/file1.sol:L=0x1234567890123456789012345678901234567890,"
"dir2/file2.sol:L=0x1111122222333334444455555666667777788888", "dir2/file2.sol:L=0x1111122222333334444455555666667777788888",
"--ast-compact-json", "--asm", "--asm-json", "--opcodes", "--bin", "--bin-runtime", "--abi", "--ast-compact-json", "--asm", "--asm-json", "--opcodes", "--bin", "--bin-runtime", "--abi",
"--ir", "--ir-optimized", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout", "--ir", "--ir-ast-json", "--ir-optimized", "--ir-optimized-ast-json", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout",
"--gas", "--gas",
"--combined-json=" "--combined-json="
"abi,metadata,bin,bin-runtime,opcodes,asm,storage-layout,generated-sources,generated-sources-runtime," "abi,metadata,bin,bin-runtime,opcodes,asm,storage-layout,generated-sources,generated-sources-runtime,"
@ -192,7 +192,8 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
expectedOptions.compiler.outputs = { expectedOptions.compiler.outputs = {
true, true, true, true, true, true, true, true, true, true,
true, true, true, true, true, true, true, true, true, true,
true, true, true, true, true, true, true, true, true,
true,
}; };
expectedOptions.compiler.estimateGas = true; expectedOptions.compiler.estimateGas = true;
expectedOptions.compiler.combinedJsonRequests = { expectedOptions.compiler.combinedJsonRequests = {
@ -290,6 +291,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
"--asm", "--asm",
"--bin", "--bin",
"--ir-optimized", "--ir-optimized",
"--ast-compact-json",
}; };
commandLine += assemblyOptions; commandLine += assemblyOptions;
if (expectedLanguage == YulStack::Language::StrictAssembly) if (expectedLanguage == YulStack::Language::StrictAssembly)
@ -329,6 +331,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
expectedOptions.compiler.outputs.asm_ = true; expectedOptions.compiler.outputs.asm_ = true;
expectedOptions.compiler.outputs.binary = true; expectedOptions.compiler.outputs.binary = true;
expectedOptions.compiler.outputs.irOptimized = true; expectedOptions.compiler.outputs.irOptimized = true;
expectedOptions.compiler.outputs.astCompactJson = true;
if (expectedLanguage == YulStack::Language::StrictAssembly) if (expectedLanguage == YulStack::Language::StrictAssembly)
{ {
expectedOptions.optimizer.enabled = true; expectedOptions.optimizer.enabled = true;