mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
236284a264
@ -986,10 +986,15 @@ void CommandLineInterface::handleAst(string const& _argStr)
|
|||||||
map<ASTNode const*, eth::GasMeter::GasConsumption> gasCosts;
|
map<ASTNode const*, eth::GasMeter::GasConsumption> gasCosts;
|
||||||
// FIXME: shouldn't this be done for every contract?
|
// FIXME: shouldn't this be done for every contract?
|
||||||
if (m_compiler->runtimeAssemblyItems(m_compiler->lastContractName()))
|
if (m_compiler->runtimeAssemblyItems(m_compiler->lastContractName()))
|
||||||
gasCosts = GasEstimator::breakToStatementLevel(
|
{
|
||||||
|
//NOTE: keep the local variable `ret` to prevent a Heisenbug that could happen on certain mac os platform.
|
||||||
|
//See: https://github.com/ethereum/solidity/issues/3718 for details.
|
||||||
|
auto ret = GasEstimator::breakToStatementLevel(
|
||||||
GasEstimator(m_evmVersion).structuralEstimation(*m_compiler->runtimeAssemblyItems(m_compiler->lastContractName()), asts),
|
GasEstimator(m_evmVersion).structuralEstimation(*m_compiler->runtimeAssemblyItems(m_compiler->lastContractName()), asts),
|
||||||
asts
|
asts
|
||||||
);
|
);
|
||||||
|
gasCosts = ret;
|
||||||
|
}
|
||||||
|
|
||||||
bool legacyFormat = !m_args.count(g_argAstCompactJson);
|
bool legacyFormat = !m_args.count(g_argAstCompactJson);
|
||||||
if (m_args.count(g_argOutputDir))
|
if (m_args.count(g_argOutputDir))
|
||||||
|
Loading…
Reference in New Issue
Block a user