diff options
author | chriseth <c@ethdev.com> | 2015-05-22 16:48:54 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-22 22:12:40 +0800 |
commit | 61fae129f2f1ae7ed73603edf06b48f5e8c8582f (patch) | |
tree | 88a929710e5fbb1f8f141ae83b7e3d174b001190 /CommandLineInterface.cpp | |
parent | c82a3e06a01174831b7c919824c71110b5d8e267 (diff) | |
download | dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar.gz dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar.bz2 dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar.lz dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar.xz dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.tar.zst dexon-solidity-61fae129f2f1ae7ed73603edf06b48f5e8c8582f.zip |
Functional gas estimator.
Diffstat (limited to 'CommandLineInterface.cpp')
-rw-r--r-- | CommandLineInterface.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/CommandLineInterface.cpp b/CommandLineInterface.cpp index 944c8f68..b81fcad1 100644 --- a/CommandLineInterface.cpp +++ b/CommandLineInterface.cpp @@ -42,7 +42,7 @@ #include <libsolidity/Exceptions.h> #include <libsolidity/CompilerStack.h> #include <libsolidity/SourceReferenceFormatter.h> -#include <libsolidity/StructuralGasEstimator.h> +#include <libsolidity/GasEstimator.h> using namespace std; namespace po = boost::program_options; @@ -465,14 +465,13 @@ void CommandLineInterface::handleAst(string const& _argStr) // do we need AST output? if (m_args.count(_argStr)) { - StructuralGasEstimator gasEstimator; vector<ASTNode const*> asts; for (auto const& sourceCode: m_sourceCodes) asts.push_back(&m_compiler->getAST(sourceCode.first)); map<ASTNode const*, eth::GasMeter::GasConsumption> gasCosts; if (m_compiler->getRuntimeAssemblyItems()) - gasCosts = gasEstimator.breakToStatementLevel( - gasEstimator.performEstimation(*m_compiler->getRuntimeAssemblyItems(), asts), + gasCosts = GasEstimator::breakToStatementLevel( + GasEstimator::structuralEstimation(*m_compiler->getRuntimeAssemblyItems(), asts), asts ); |