| 118 | } |
| 119 | |
| 120 | unsigned 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 | |
| 136 | void Assembly::importAssemblyItemsFromJSON(Json const& _code, std::vector<std::string> const& _sourceList) |
| 137 | { |
nothing calls this directly
no test coverage detected