mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Compiler version stamp.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user