diff options
author | chriseth <chris@ethereum.org> | 2017-06-15 01:40:53 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-15 02:02:45 +0800 |
commit | e5b0ad562e550a092aa966d8f5b9cb15ca625255 (patch) | |
tree | 544751c45e8861ddec039217346b1d491589c208 /libevmasm/AssemblyItem.h | |
parent | f008ddf83646f6002a61a123cc94ad195a35dce4 (diff) | |
download | dexon-solidity-e5b0ad562e550a092aa966d8f5b9cb15ca625255.tar.gz dexon-solidity-e5b0ad562e550a092aa966d8f5b9cb15ca625255.tar.zst dexon-solidity-e5b0ad562e550a092aa966d8f5b9cb15ca625255.zip |
Peephole optimizer for double push.
Diffstat (limited to 'libevmasm/AssemblyItem.h')
-rw-r--r-- | libevmasm/AssemblyItem.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h index 464368fb..d38db927 100644 --- a/libevmasm/AssemblyItem.h +++ b/libevmasm/AssemblyItem.h @@ -148,6 +148,14 @@ private: using AssemblyItems = std::vector<AssemblyItem>; +inline size_t bytesRequired(AssemblyItems const& _items, size_t _addressLength) +{ + size_t size = 0; + for (AssemblyItem const& item: _items) + size += item.bytesRequired(_addressLength); + return size; +} + std::ostream& operator<<(std::ostream& _out, AssemblyItem const& _item); inline std::ostream& operator<<(std::ostream& _out, AssemblyItems const& _items) { |