aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerUtils.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-04-01 20:22:42 +0800
committerLiana Husikyan <liana@ethdev.com>2015-04-08 21:56:35 +0800
commitfb1cf35f3b624b01c56cca4cb1f919134a34082e (patch)
treeeb3ad7b041863afad90551b6de2e8aa78d56b29a /CompilerUtils.cpp
parentdf3ce3ad8f365ab7842823f4694490ad80a651c5 (diff)
downloaddexon-solidity-fb1cf35f3b624b01c56cca4cb1f919134a34082e.tar.gz
dexon-solidity-fb1cf35f3b624b01c56cca4cb1f919134a34082e.tar.zst
dexon-solidity-fb1cf35f3b624b01c56cca4cb1f919134a34082e.zip
added implementation to append code for State variable accessor
fixed tests
Diffstat (limited to 'CompilerUtils.cpp')
-rw-r--r--CompilerUtils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/CompilerUtils.cpp b/CompilerUtils.cpp
index 511254fa..45495114 100644
--- a/CompilerUtils.cpp
+++ b/CompilerUtils.cpp
@@ -157,8 +157,12 @@ void CompilerUtils::copyToStackTop(unsigned _stackDepth, unsigned _itemSize)
void CompilerUtils::popStackElement(Type const& _type)
{
- unsigned const size = _type.getSizeOnStack();
- for (unsigned i = 0; i < size; ++i)
+ popStackSlots(_type.getSizeOnStack());
+}
+
+void CompilerUtils::popStackSlots(size_t _amount)
+{
+ for (size_t i = 0; i < _amount; ++i)
m_context << eth::Instruction::POP;
}