diff options
author | chriseth <chris@ethereum.org> | 2017-10-19 19:43:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-19 19:43:17 +0800 |
commit | 4e7d1440ab84ba0566c7c75ff61b2f9e70738ef4 (patch) | |
tree | f4983ffe53f5c63478c682219f6cfae221493cd6 /solc/CommandLineInterface.cpp | |
parent | b96602122c2380b1759a8f657a9b97e30c5978b0 (diff) | |
parent | 8d3cfa8cff85b1aed7c1b77a0886a58b09144a36 (diff) | |
download | dexon-solidity-4e7d1440ab84ba0566c7c75ff61b2f9e70738ef4.tar.gz dexon-solidity-4e7d1440ab84ba0566c7c75ff61b2f9e70738ef4.tar.zst dexon-solidity-4e7d1440ab84ba0566c7c75ff61b2f9e70738ef4.zip |
Merge pull request #3101 from ethereum/compilerstack-header
Remove the reliance on empty contract name equals "last contract" in CompilerStack
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index fe1461b4..9e2cb77a 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -938,9 +938,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(m_compiler->lastContractName())) gasCosts = GasEstimator::breakToStatementLevel( - GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(), asts), + GasEstimator::structuralEstimation(*m_compiler->runtimeAssemblyItems(m_compiler->lastContractName()), asts), asts ); |