diff options
author | chriseth <c@ethdev.com> | 2016-04-07 02:55:46 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-04-07 02:56:00 +0800 |
commit | f227050c203fd0da70fcefbbecc922fd16045aa6 (patch) | |
tree | 40ad7d2e00f051368349bdfc017a0d4b455d8313 /libsolidity/codegen/ExpressionCompiler.cpp | |
parent | 193b1c940ce3e21d52e2cbdd253c1d7cb820fa06 (diff) | |
download | dexon-solidity-f227050c203fd0da70fcefbbecc922fd16045aa6.tar.gz dexon-solidity-f227050c203fd0da70fcefbbecc922fd16045aa6.tar.zst dexon-solidity-f227050c203fd0da70fcefbbecc922fd16045aa6.zip |
Make solidity independent from ethcore.
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index ed36fb24..d1cbc8ed 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -25,16 +25,14 @@ #include <boost/range/adaptor/reversed.hpp> #include <libdevcore/Common.h> #include <libdevcore/SHA3.h> -#include <libethcore/ChainOperationParams.h> #include <libsolidity/ast/AST.h> #include <libsolidity/codegen/ExpressionCompiler.h> #include <libsolidity/codegen/CompilerContext.h> #include <libsolidity/codegen/CompilerUtils.h> #include <libsolidity/codegen/LValue.h> +#include <libevmasm/GasMeter.h> using namespace std; -// TODO: FIXME: HOMESTEAD: XXX: @chriseth Params deprecated - use EVMSchedule instead. - namespace dev { namespace solidity @@ -1454,14 +1452,13 @@ void ExpressionCompiler::appendExternalFunctionCall( m_context << dupInstruction(m_context.baseToCurrentStackOffset(gasStackPos)); else { - eth::EVMSchedule schedule; // send all gas except the amount needed to execute "SUB" and "CALL" // @todo this retains too much gas for now, needs to be fine-tuned. - u256 gasNeededByCaller = schedule.callGas + 10; + u256 gasNeededByCaller = eth::GasCosts::callGas + 10; if (_functionType.valueSet()) - gasNeededByCaller += schedule.callValueTransferGas; + gasNeededByCaller += eth::GasCosts::callValueTransferGas; if (!isCallCode && !isDelegateCall) - gasNeededByCaller += schedule.callNewAccountGas; // we never know + gasNeededByCaller += eth::GasCosts::callNewAccountGas; // we never know m_context << gasNeededByCaller << Instruction::GAS << |