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

Function codeSize

libevmasm/Inliner.cpp:62–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60/// @returns an estimation of the code size in bytes needed for the AssemblyItems in @a _itemRange.
61template<typename RangeType>
62uint64_t codeSize(RangeType const& _itemRange, langutil::EVMVersion _evmVersion)
63{
64 return ranges::accumulate(_itemRange | ranges::views::transform(
65 [&](auto const& _item) { return _item.bytesRequired(2, _evmVersion, Precision::Approximate); }
66 ), 0u);
67}
68/// @returns the tag id, if @a _item is a PushTag or Tag into the current subassembly, std::nullopt otherwise.
69std::optional<size_t> getLocalTag(AssemblyItem const& _item)
70{

Callers 6

Assembly.cppFile · 0.70
shouldInlineMethod · 0.70
tooSimpleToBePrunedFunction · 0.50
FullInlinerMethod · 0.50
updateCodeSizeMethod · 0.50

Calls 1

bytesRequiredMethod · 0.45

Tested by

no test coverage detected