Remove clone feature.

This commit is contained in:
chriseth
2018-08-07 11:10:50 +01:00
committed by Alex Beregszaszi
parent d33e5683f5
commit 71e26f6adb
9 changed files with 3 additions and 122 deletions
-23
View File
@@ -329,7 +329,6 @@ void CompilerStack::link()
{
contract.second.object.link(m_libraries);
contract.second.runtimeObject.link(m_libraries);
contract.second.cloneObject.link(m_libraries);
}
}
@@ -408,11 +407,6 @@ eth::LinkerObject const& CompilerStack::runtimeObject(string const& _contractNam
return contract(_contractName).runtimeObject;
}
eth::LinkerObject const& CompilerStack::cloneObject(string const& _contractName) const
{
return contract(_contractName).cloneObject;
}
/// FIXME: cache this string
string CompilerStack::assemblyString(string const& _contractName, StringMap _sourceCodes) const
{
@@ -767,23 +761,6 @@ void CompilerStack::compileContract(
}
_compiledContracts[compiledContract.contract] = &compiler->assembly();
try
{
if (!_contract.isLibrary())
{
Compiler cloneCompiler(m_evmVersion, m_optimize, m_optimizeRuns);
cloneCompiler.compileClone(_contract, _compiledContracts);
compiledContract.cloneObject = cloneCompiler.assembledObject();
}
}
catch (eth::AssemblyException const&)
{
// In some cases (if the constructor requests a runtime function), it is not
// possible to compile the clone.
// TODO: Report error / warning
}
}
string const CompilerStack::lastContractName() const