aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerContext.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-12 23:49:26 +0800
committerChristian <c@ethdev.com>2014-12-15 20:05:18 +0800
commit2f64c56ef3a49f7551a708f63c4ed836efce7b73 (patch)
tree6dd2a10b9ef7b0a67206991416dd0a74639f66ea /CompilerContext.cpp
parentc8586996059c3d2ae3c7025c2d4247073468ed73 (diff)
downloaddexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.gz
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.bz2
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.lz
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.xz
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.zst
dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.zip
Create contracts.
Diffstat (limited to 'CompilerContext.cpp')
-rw-r--r--CompilerContext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/CompilerContext.cpp b/CompilerContext.cpp
index cd22c4e8..47401436 100644
--- a/CompilerContext.cpp
+++ b/CompilerContext.cpp
@@ -62,6 +62,14 @@ void CompilerContext::addFunction(FunctionDefinition const& _function)
m_functionEntryLabels.insert(std::make_pair(&_function, m_asm.newTag()));
}
+bytes const& CompilerContext::getCompiledContract(const ContractDefinition& _contract) const
+{
+ auto ret = m_compiledContracts.find(&_contract);
+ if (asserts(ret != m_compiledContracts.end()))
+ BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Compiled contract not found."));
+ return *ret->second;
+}
+
bool CompilerContext::isLocalVariable(Declaration const* _declaration) const
{
return m_localVariables.count(_declaration) > 0;