aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerUtils.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-11 21:24:34 +0800
committerChristian <c@ethdev.com>2015-02-12 18:33:10 +0800
commit8a2879a603b256dbff9c4592943c48e68fba1aea (patch)
tree9f9beda6bcd8febcac37b5e6b439bb4217b35282 /CompilerUtils.h
parentadb434569c7f54a12dfbdc674b50a4a4baca59e4 (diff)
downloaddexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.tar.gz
dexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.tar.zst
dexon-solidity-8a2879a603b256dbff9c4592943c48e68fba1aea.zip
Copy storage to storage.
Diffstat (limited to 'CompilerUtils.h')
-rw-r--r--CompilerUtils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/CompilerUtils.h b/CompilerUtils.h
index e591e9a7..49375047 100644
--- a/CompilerUtils.h
+++ b/CompilerUtils.h
@@ -70,6 +70,11 @@ public:
static unsigned getSizeOnStack(std::vector<T> const& _variables);
static unsigned getSizeOnStack(std::vector<std::shared_ptr<Type const>> const& _variableTypes);
+ /// Appends code that computes tha SHA3 hash of the topmost stack element of type @a _type.
+ /// If @a _pad is set, padds the type to muliples of 32 bytes.
+ /// @note Only works for types of fixed size.
+ void computeHashStatic(Type const& _type = IntegerType(256), bool _padToWordBoundaries = false);
+
/// Bytes we need to the start of call data.
/// - The size in bytes of the function (hash) identifier.
static const unsigned int dataStartOffset;