aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerUtils.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-21 16:59:48 +0800
committerchriseth <c@ethdev.com>2015-04-22 17:43:49 +0800
commita6d08950c6a81de3698ea8be01d2d5c472fe41e6 (patch)
treef1c74eb23c8e8cf351d08ea9c07682d78db1b0b5 /CompilerUtils.cpp
parenta44bcb6909478543151cac871fdbbc4909ad54aa (diff)
downloaddexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.gz
dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.zst
dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.zip
bytes parameters for events and sha3.
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r--CompilerUtils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp
index 8d3e9d2a..07bc3cda 100644
--- a/CompilerUtils.cpp
+++ b/CompilerUtils.cpp
@@ -155,6 +155,13 @@ void CompilerUtils::copyToStackTop(unsigned _stackDepth, unsigned _itemSize)
m_context << eth::dupInstruction(_stackDepth);
}
+void CompilerUtils::moveToStackTop(unsigned _stackDepth)
+{
+ solAssert(_stackDepth <= 15, "Stack too deep.");
+ for (unsigned i = 0; i < _stackDepth; ++i)
+ m_context << eth::swapInstruction(1 + i);
+}
+
void CompilerUtils::popStackElement(Type const& _type)
{
popStackSlots(_type.getSizeOnStack());