diff options
author | chriseth <c@ethdev.com> | 2017-01-06 18:33:08 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-13 00:52:26 +0800 |
commit | afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e (patch) | |
tree | d7ad918559cfe5a2e9c1012aa7bb2bf1ef1fc69f /libevmasm/AssemblyItem.cpp | |
parent | 74d74fb00bc159076d8322c5780894b1c2d68791 (diff) | |
download | dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar.gz dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar.bz2 dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar.lz dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar.xz dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.tar.zst dexon-solidity-afad40ac5a259cf60cd2f5c8b31495f3f64f3e8e.zip |
Optimise AssemblyItem::m_data.
Diffstat (limited to 'libevmasm/AssemblyItem.cpp')
-rw-r--r-- | libevmasm/AssemblyItem.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libevmasm/AssemblyItem.cpp b/libevmasm/AssemblyItem.cpp index b790e094..6c7d5425 100644 --- a/libevmasm/AssemblyItem.cpp +++ b/libevmasm/AssemblyItem.cpp @@ -29,19 +29,19 @@ using namespace dev::eth; AssemblyItem AssemblyItem::toSubAssemblyTag(size_t _subId) const { - assertThrow(m_data < (u256(1) << 64), Exception, "Tag already has subassembly set."); + assertThrow(data() < (u256(1) << 64), Exception, "Tag already has subassembly set."); assertThrow(m_type == PushTag || m_type == Tag, Exception, ""); AssemblyItem r = *this; r.m_type = PushTag; - r.setPushTagSubIdAndTag(_subId, size_t(m_data)); + r.setPushTagSubIdAndTag(_subId, size_t(data())); return r; } pair<size_t, size_t> AssemblyItem::splitForeignPushTag() const { assertThrow(m_type == PushTag || m_type == Tag, Exception, ""); - return make_pair(size_t(m_data / (u256(1) << 64)) - 1, size_t(m_data)); + return make_pair(size_t((data()) / (u256(1) << 64)) - 1, size_t(data())); } void AssemblyItem::setPushTagSubIdAndTag(size_t _subId, size_t _tag) @@ -60,7 +60,7 @@ unsigned AssemblyItem::bytesRequired(unsigned _addressLength) const case PushString: return 33; case Push: - return 1 + max<unsigned>(1, dev::bytesRequired(m_data)); + return 1 + max<unsigned>(1, dev::bytesRequired(data())); case PushSubSize: case PushProgramSize: return 4; // worst case: a 16MB program |