diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-07-04 20:14:41 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-07-11 00:39:38 +0800 |
commit | 9d895e002d0e5e1e3435d03ac82277caa397bbec (patch) | |
tree | 5931b89c3ae65d6bc2c5647d82ade808f5676abb /libsolidity/codegen/CompilerUtils.h | |
parent | 1f77deada1abc9ca1e635ab13d45707e852a5628 (diff) | |
download | dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar.gz dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar.bz2 dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar.lz dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar.xz dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.tar.zst dexon-solidity-9d895e002d0e5e1e3435d03ac82277caa397bbec.zip |
Added tests and review suggestions
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.h')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerUtils.h b/libsolidity/codegen/CompilerUtils.h index 0ff3ad7c..26df4765 100644 --- a/libsolidity/codegen/CompilerUtils.h +++ b/libsolidity/codegen/CompilerUtils.h @@ -241,6 +241,10 @@ public: void popStackElement(Type const& _type); /// Removes element from the top of the stack _amount times. void popStackSlots(size_t _amount); + /// Pops slots from the stack such that its height is _toHeight. + /// Adds jump to _jumpTo. + /// Readjusts the stack offset to the original value. + void popAndJump(unsigned _toHeight, eth::AssemblyItem const& _jumpTo); template <class T> static unsigned sizeOnStack(std::vector<T> const& _variables); |