MCPcopy Create free account
hub / github.com/argotorg/solidity / encodeAllPossibleSubPathsInAssemblyTree

Method encodeAllPossibleSubPathsInAssemblyTree

libevmasm/Assembly.cpp:719–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719void Assembly::encodeAllPossibleSubPathsInAssemblyTree(std::vector<SubAssemblyID> _pathFromRoot, std::vector<Assembly*> _assembliesOnPath)
720{
721 _assembliesOnPath.push_back(this);
722 for (_pathFromRoot.push_back(SubAssemblyID{0}); _pathFromRoot.back().value < m_subs.size(); ++_pathFromRoot.back().value)
723 {
724 for (size_t distanceFromRoot = 0; distanceFromRoot < _assembliesOnPath.size(); ++distanceFromRoot)
725 _assembliesOnPath[distanceFromRoot]->encodeSubPath(
726 _pathFromRoot | ranges::views::drop_exactly(distanceFromRoot) | ranges::to<std::vector>
727 );
728
729 m_subs[_pathFromRoot.back().asIndex()]->encodeAllPossibleSubPathsInAssemblyTree(_pathFromRoot, _assembliesOnPath);
730 }
731}
732
733std::shared_ptr<std::string const> Assembly::sharedSourceName(std::string const& _name) const
734{

Callers 1

fromJSONMethod · 0.80

Calls 3

encodeSubPathMethod · 0.80
asIndexMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected