diff options
author | Christian <c@ethdev.com> | 2015-02-11 21:24:34 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-12 18:33:10 +0800 |
commit | 8a2879a603b256dbff9c4592943c48e68fba1aea (patch) | |
tree | 9f9beda6bcd8febcac37b5e6b439bb4217b35282 /CompilerUtils.cpp | |
parent | adb434569c7f54a12dfbdc674b50a4a4baca59e4 (diff) | |
download | dexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.tar.gz dexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.tar.zst dexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.zip |
Copy storage to storage.
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r-- | CompilerUtils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp index 12940367..c38149c1 100644 --- a/CompilerUtils.cpp +++ b/CompilerUtils.cpp @@ -116,6 +116,12 @@ unsigned CompilerUtils::getSizeOnStack(vector<shared_ptr<Type const>> const& _va return size; } +void CompilerUtils::computeHashStatic(Type const& _type, bool _padToWordBoundaries) +{ + unsigned length = storeInMemory(0, _type, _padToWordBoundaries); + m_context << u256(length) << u256(0) << eth::Instruction::SHA3; +} + unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWordBoundaries) { unsigned _encodedSize = _type.getCalldataEncodedSize(); |