Always require a contract/sourceName in CompilerStack

This commit is contained in:
Alex Beregszaszi
2017-10-18 23:32:33 +01:00
parent 7454a766b3
commit 039cc25b1f
4 changed files with 24 additions and 23 deletions
+3 -2
View File
@@ -951,9 +951,10 @@ void CommandLineInterface::handleAst(string const& _argStr)
for (auto const& sourceCode: m_sourceCodes)
asts.push_back(&m_compiler->ast(sourceCode.first));
map<ASTNode const*, eth::GasMeter::GasConsumption> gasCosts;
if (m_compiler->runtimeAssemblyItems())
// FIXME: shouldn't this be done for every contract?
if (m_compiler->runtimeAssemblyItems(""))
gasCosts = GasEstimator::breakToStatementLevel(
GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(), asts),
GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(""), asts),
asts
);