aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/CompilerContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/CompilerContext.cpp')
-rw-r--r--libsolidity/CompilerContext.cpp9
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