aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-12-01 00:32:54 +0800
committerchriseth <c@ethdev.com>2015-12-01 01:50:47 +0800
commit35b310cfaf1d44aba8d12f15a528e49ac5a1997d (patch)
treeb41d2144ec9f1f3704149a90ef69e36404089a0c /libsolidity/codegen/CompilerUtils.h
parente9c7837c154482a72c8519fbdc9376693ce9a1d5 (diff)
downloaddexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar.gz
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar.bz2
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar.lz
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar.xz
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.tar.zst
dexon-solidity-35b310cfaf1d44aba8d12f15a528e49ac5a1997d.zip
Simplify and optimise stack rotation.
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.h')
-rw-r--r--libsolidity/codegen/CompilerUtils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerUtils.h b/libsolidity/codegen/CompilerUtils.h
index 134afd78..55254013 100644
--- a/libsolidity/codegen/CompilerUtils.h
+++ b/libsolidity/codegen/CompilerUtils.h
@@ -134,6 +134,12 @@ public:
void moveToStackTop(unsigned _stackDepth, unsigned _itemSize = 1);
/// Moves @a _itemSize elements past @a _stackDepth other stack elements
void moveIntoStack(unsigned _stackDepth, unsigned _itemSize = 1);
+ /// Rotates the topmost @a _items items on the stack, such that the previously topmost element
+ /// is bottom-most.
+ void rotateStackUp(unsigned _items);
+ /// Rotates the topmost @a _items items on the stack, such that the previously bottom-most element
+ /// is now topmost.
+ void rotateStackDown(unsigned _items);
/// Removes the current value from the top of the stack.
void popStackElement(Type const& _type);
/// Removes element from the top of the stack _amount times.