aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-03-30 20:42:05 +0800
committerchriseth <c@ethdev.com>2016-03-30 20:42:05 +0800
commit9ca29aa508a25b5ccd9261ab7fd441df27d7da5f (patch)
treedaca1d62b8253827bf8086dba3bd8679404a8660 /libsolidity/codegen/CompilerContext.h
parent8236732e9a5d2535afd3a3573a70d5aab3da3efe (diff)
parentb336f6261c2373cc769bcafb0466a251576f3fdd (diff)
downloaddexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar.gz
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar.bz2
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar.lz
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar.xz
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.tar.zst
dexon-solidity-9ca29aa508a25b5ccd9261ab7fd441df27d7da5f.zip
Merge pull request #430 from chriseth/assembly
Inline Assembly
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r--libsolidity/codegen/CompilerContext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h
index 5287088a..bd8fc295 100644
--- a/libsolidity/codegen/CompilerContext.h
+++ b/libsolidity/codegen/CompilerContext.h
@@ -109,6 +109,8 @@ public:
/// Adds a subroutine to the code (in the data section) and pushes its size (via a tag)
/// on the stack. @returns the assembly item corresponding to the pushed subroutine, i.e. its offset.
eth::AssemblyItem addSubroutine(eth::Assembly const& _assembly) { return m_asm.appendSubSize(_assembly); }
+ /// Appends the given code (used by inline assembly) ignoring any stack height changes.
+ void appendInlineAssembly(eth::Assembly const& _assembly) { int deposit = m_asm.deposit(); m_asm.append(_assembly); m_asm.setDeposit(deposit); }
/// Pushes the size of the final program
void appendProgramSize() { return m_asm.appendProgramSize(); }
/// Adds data to the data section, pushes a reference to the stack