Reorder CompilerStack to be in logical order

This commit is contained in:
Alex Beregszaszi
2017-07-26 22:16:02 +01:00
parent a605e4eb95
commit 9982e73dce
2 changed files with 55 additions and 39 deletions
+10 -10
View File
@@ -252,16 +252,6 @@ bool CompilerStack::parseAndAnalyze()
return parse() && analyze();
}
vector<string> CompilerStack::contractNames() const
{
if (m_stackState < AnalysisSuccessful)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Parsing was not successful."));
vector<string> contractNames;
for (auto const& contract: m_contracts)
contractNames.push_back(contract.first);
return contractNames;
}
bool CompilerStack::compile()
{
if (m_stackState < AnalysisSuccessful)
@@ -288,6 +278,16 @@ void CompilerStack::link()
}
}
vector<string> CompilerStack::contractNames() const
{
if (m_stackState < AnalysisSuccessful)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Parsing was not successful."));
vector<string> contractNames;
for (auto const& contract: m_contracts)
contractNames.push_back(contract.first);
return contractNames;
}
eth::AssemblyItems const* CompilerStack::assemblyItems(string const& _contractName) const
{
Contract const& currentContract = contract(_contractName);