diff options
author | chriseth <chris@ethereum.org> | 2018-07-12 19:01:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-12 19:01:15 +0800 |
commit | 576f3ef18c47c13b92e5b604d19f99018b0300b0 (patch) | |
tree | 3cf2e9c41606f6c2a599621297a8155e097333dc /libsolidity/codegen/CompilerUtils.h | |
parent | c438b73f689b904152f4b8b636579317fb55e60a (diff) | |
parent | a18a475b1a6ba1ebcf235f322dec0e7ff3d3dcb0 (diff) | |
download | dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar.gz dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar.bz2 dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar.lz dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar.xz dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.tar.zst dexon-solidity-576f3ef18c47c13b92e5b604d19f99018b0300b0.zip |
Merge pull request #4083 from ethereum/variable_stack_slot
[BREAKING] Allocate local variables according to their scope
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); |