diff options
author | chriseth <chris@ethereum.org> | 2017-06-09 19:59:16 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-16 17:56:21 +0800 |
commit | 868b5ad3aa9741609e9cd79d6033ee4b172dbe2f (patch) | |
tree | 293c82b54f40527135c8949a960b74a5695152eb /libjulia/backends/evm/EVMCodeTransform.h | |
parent | 1b3ba7bc5796e30143763eb8fcca589bd7095edb (diff) | |
download | dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar.gz dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar.bz2 dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar.lz dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar.xz dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.tar.zst dexon-solidity-868b5ad3aa9741609e9cd79d6033ee4b172dbe2f.zip |
Split block code generation into main and finalize.
Diffstat (limited to 'libjulia/backends/evm/EVMCodeTransform.h')
-rw-r--r-- | libjulia/backends/evm/EVMCodeTransform.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.h b/libjulia/backends/evm/EVMCodeTransform.h index 7824247a..57bd4ca5 100644 --- a/libjulia/backends/evm/EVMCodeTransform.h +++ b/libjulia/backends/evm/EVMCodeTransform.h @@ -61,9 +61,6 @@ public: { } - /// Processes the block and appends the resulting code to the assembly. - void run(solidity::assembly::Block const& _block); - protected: struct Context { @@ -113,6 +110,10 @@ private: /// Generates code for an expression that is supposed to return a single value. void visitExpression(solidity::assembly::Statement const& _expression); + /// Pops all variables declared in the block and checks that the stack height is equal + /// to @a _blackStartStackHeight. + void finalizeBlock(solidity::assembly::Block const& _block, int _blockStartStackHeight); + void generateAssignment(solidity::assembly::Identifier const& _variableName); /// Determines the stack height difference to the given variables. Throws |