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

Method codeSize

libevmasm/Assembly.cpp:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120unsigned Assembly::codeSize(unsigned subTagSize) const
121{
122 for (unsigned tagSize = subTagSize; true; ++tagSize)
123 {
124 size_t ret = 1;
125 for (auto const& i: m_data)
126 ret += i.second.size();
127
128 for (auto const& codeSection: m_codeSections)
129 for (AssemblyItem const& i: codeSection.items)
130 ret += i.bytesRequired(tagSize, m_evmVersion, Precision::Precise);
131 if (numberEncodingSize(ret) <= tagSize)
132 return static_cast<unsigned>(ret);
133 }
134}
135
136void Assembly::importAssemblyItemsFromJSON(Json const& _code, std::vector<std::string> const& _sourceList)
137{

Callers

nothing calls this directly

Calls 3

numberEncodingSizeFunction · 0.85
sizeMethod · 0.45
bytesRequiredMethod · 0.45

Tested by

no test coverage detected