aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerUtils.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-10 21:33:30 +0800
committerChristian <c@ethdev.com>2014-12-10 21:33:30 +0800
commitda62403e79308b5bf4be9656e1b55db2f0a71e3b (patch)
tree291ea15a500c90afc6d05f5f907713b3d10f9c0d /CompilerUtils.cpp
parent5edffeba19192c2fc8683e8e683cf5bbc261e28b (diff)
downloaddexon-solidity-da62403e79308b5bf4be9656e1b55db2f0a71e3b.tar.gz
dexon-solidity-da62403e79308b5bf4be9656e1b55db2f0a71e3b.tar.zst
dexon-solidity-da62403e79308b5bf4be9656e1b55db2f0a71e3b.zip
Stylistic changes.
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r--CompilerUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp
index 824fd477..d4dfbe3c 100644
--- a/CompilerUtils.cpp
+++ b/CompilerUtils.cpp
@@ -35,6 +35,7 @@ void CompilerUtils::moveToStackVariable(VariableDeclaration const& _variable)
{
unsigned const stackPosition = m_context.baseToCurrentStackOffset(m_context.getBaseStackOffsetOfVariable(_variable));
unsigned const size = _variable.getType()->getSizeOnStack();
+ // move variable starting from its top end in the stack
if (stackPosition - size + 1 > 16)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(_variable.getLocation())
<< errinfo_comment("Stack too deep."));
@@ -42,7 +43,7 @@ void CompilerUtils::moveToStackVariable(VariableDeclaration const& _variable)
m_context << eth::swapInstruction(stackPosition - size + 1) << eth::Instruction::POP;
}
-void CompilerUtils::copyToStackTop(unsigned _stackDepth, const Type& _type)
+void CompilerUtils::copyToStackTop(unsigned _stackDepth, Type const& _type)
{
if (_stackDepth > 16)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Stack too deep."));