aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/SemanticInformation.h
diff options
context:
space:
mode:
Diffstat (limited to 'libevmasm/SemanticInformation.h')
-rw-r--r--libevmasm/SemanticInformation.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libevmasm/SemanticInformation.h b/libevmasm/SemanticInformation.h
index e5ea7c18..83656252 100644
--- a/libevmasm/SemanticInformation.h
+++ b/libevmasm/SemanticInformation.h
@@ -49,6 +49,10 @@ struct SemanticInformation
/// @returns false if the value put on the stack by _item depends on anything else than
/// the information in the current block header, memory, storage or stack.
static bool isDeterministic(AssemblyItem const& _item);
+ /// @returns true if the instruction can be moved or copied (together with its arguments)
+ /// without altering the semantics. This means it cannot depend on storage or memory,
+ /// cannot have any side-effects, but it can depend on a call-constant state of the blockchain.
+ static bool movable(solidity::Instruction _instruction);
/// @returns true if the given instruction modifies memory.
static bool invalidatesMemory(solidity::Instruction _instruction);
/// @returns true if the given instruction modifies storage (even indirectly).