diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-15 03:26:26 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-15 04:21:26 +0800 |
commit | 6a260a9ff1c0c9c8ee14e988bd066b74555651e7 (patch) | |
tree | f476771bb94ffd2d698348fa460ea3b008e385f1 /liblll | |
parent | 18fc66765808c717c0ed5f3f2b3da979618c329d (diff) | |
download | dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar.gz dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar.bz2 dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar.lz dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar.xz dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.tar.zst dexon-solidity-6a260a9ff1c0c9c8ee14e988bd066b74555651e7.zip |
Remove single use Assembly::popTo
Diffstat (limited to 'liblll')
-rw-r--r-- | liblll/CodeFragment.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 0f7f48ba..47ddc4a6 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -571,7 +571,9 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { for (auto const& i: code) m_asm.append(i.m_asm); - m_asm.popTo(1); + // Leave only the last item on stack. + while (m_asm.deposit() > 1) + m_asm.append(Instruction::POP); } else if (us == "BYTECODESIZE") { |