diff options
author | chriseth <c@ethdev.com> | 2015-10-06 20:13:07 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-06 20:20:06 +0800 |
commit | 99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54 (patch) | |
tree | fd0c7d5797454be93d4c767142ed6042ebf4d00f /libsolidity/CompilerContext.cpp | |
parent | 44e42bf52e481f4f653a669291812b4d31f06022 (diff) | |
download | dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.tar.gz dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.tar.zst dexon-solidity-99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54.zip |
Compiler version stamp.
Diffstat (limited to 'libsolidity/CompilerContext.cpp')
-rw-r--r-- | libsolidity/CompilerContext.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/CompilerContext.cpp b/libsolidity/CompilerContext.cpp index 717627a5..fa7f9c77 100644 --- a/libsolidity/CompilerContext.cpp +++ b/libsolidity/CompilerContext.cpp @@ -20,10 +20,12 @@ * Utilities for the solidity compiler. */ +#include <libsolidity/CompilerContext.h> #include <utility> #include <numeric> #include <libsolidity/AST.h> #include <libsolidity/Compiler.h> +#include <libsolidity/Version.h> using namespace std; @@ -177,6 +179,13 @@ void CompilerContext::resetVisitedNodes(ASTNode const* _node) updateSourceLocation(); } +void CompilerContext::injectVersionStampIntoSub(size_t _subIndex) +{ + eth::Assembly& sub = m_asm.sub(_subIndex); + sub.injectStart(eth::Instruction::POP); + sub.injectStart(fromBigEndian<u256>(binaryVersion())); +} + eth::AssemblyItem CompilerContext::virtualFunctionEntryLabel( FunctionDefinition const& _function, vector<ContractDefinition const*>::const_iterator _searchStart |