aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/Compiler.cpp
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-11-08 22:25:32 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:18 +0800
commitc9f9b2ab4d421e99055425ace5deeb76d8f4fdd2 (patch)
tree3ac98a19b929334a70d6ed47551b36d41a0f6a62 /libsolidity/codegen/Compiler.cpp
parent5011d6339a185a55d6cdc3e952dea7bdd14a2ff7 (diff)
downloaddexon-solidity-c9f9b2ab4d421e99055425ace5deeb76d8f4fdd2.tar.gz
dexon-solidity-c9f9b2ab4d421e99055425ace5deeb76d8f4fdd2.tar.zst
dexon-solidity-c9f9b2ab4d421e99055425ace5deeb76d8f4fdd2.zip
codegen: add a compilation mode and a runtime context to CompilerContext
Diffstat (limited to 'libsolidity/codegen/Compiler.cpp')
-rw-r--r--libsolidity/codegen/Compiler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/codegen/Compiler.cpp b/libsolidity/codegen/Compiler.cpp
index 1ae5dda9..bb8211ad 100644
--- a/libsolidity/codegen/Compiler.cpp
+++ b/libsolidity/codegen/Compiler.cpp
@@ -33,10 +33,10 @@ void Compiler::compileContract(
std::map<const ContractDefinition*, eth::Assembly const*> const& _contracts
)
{
- ContractCompiler runtimeCompiler(m_runtimeContext, m_optimize);
+ ContractCompiler runtimeCompiler(CompilationMode::Runtime, nullptr, m_runtimeContext, m_optimize);
runtimeCompiler.compileContract(_contract, _contracts);
- ContractCompiler creationCompiler(m_context, m_optimize);
+ ContractCompiler creationCompiler(CompilationMode::Creation, &m_runtimeContext, m_context, m_optimize);
m_runtimeSub = creationCompiler.compileConstructor(m_runtimeContext, _contract, _contracts);
if (m_optimize)
@@ -54,7 +54,7 @@ void Compiler::compileClone(
map<ContractDefinition const*, eth::Assembly const*> const& _contracts
)
{
- ContractCompiler cloneCompiler(m_context, m_optimize);
+ ContractCompiler cloneCompiler(CompilationMode::Creation, &m_runtimeContext, m_context, m_optimize);
m_runtimeSub = cloneCompiler.compileClone(_contract, _contracts);
if (m_optimize)