diff options
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libsolidity/codegen/Compiler.cpp | 5 | ||||
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 11 | ||||
-rw-r--r-- | libsolidity/interface/Version.cpp | 4 |
4 files changed, 8 insertions, 14 deletions
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt index 5f4a1a06..e86792c1 100644 --- a/libsolidity/CMakeLists.txt +++ b/libsolidity/CMakeLists.txt @@ -15,7 +15,7 @@ file(GLOB HEADERS "*/*.h") include_directories(BEFORE ..) add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) -eth_use(${EXECUTABLE} REQUIRED Dev::devcore Eth::evmcore Solidity::evmasm) +eth_use(${EXECUTABLE} REQUIRED Dev::devcore Solidity::evmasm) install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libsolidity/codegen/Compiler.cpp b/libsolidity/codegen/Compiler.cpp index 8b718fca..614c01ee 100644 --- a/libsolidity/codegen/Compiler.cpp +++ b/libsolidity/codegen/Compiler.cpp @@ -24,8 +24,8 @@ #include <algorithm> #include <boost/range/adaptor/reversed.hpp> #include <libevmasm/Instruction.h> -#include <libethcore/ChainOperationParams.h> #include <libevmasm/Assembly.h> +#include <libevmasm/GasMeter.h> #include <libsolidity/inlineasm/AsmCodeGen.h> #include <libsolidity/ast/AST.h> #include <libsolidity/codegen/ExpressionCompiler.h> @@ -853,7 +853,6 @@ void Compiler::compileExpression(Expression const& _expression, TypePointer cons eth::Assembly Compiler::cloneRuntime() { - eth::EVMSchedule schedule; eth::Assembly a; a << Instruction::CALLDATASIZE; a << u256(0) << Instruction::DUP1 << Instruction::CALLDATACOPY; @@ -863,7 +862,7 @@ eth::Assembly Compiler::cloneRuntime() // this is the address which has to be substituted by the linker. //@todo implement as special "marker" AssemblyItem. a << u256("0xcafecafecafecafecafecafecafecafecafecafe"); - a << u256(schedule.callGas + 10) << Instruction::GAS << Instruction::SUB; + a << u256(eth::GasCosts::callGas + 10) << Instruction::GAS << Instruction::SUB; a << Instruction::DELEGATECALL; //Propagate error condition (if DELEGATECALL pushes 0 on stack). a << Instruction::ISZERO; 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 << diff --git a/libsolidity/interface/Version.cpp b/libsolidity/interface/Version.cpp index 84a82dbf..a846efea 100644 --- a/libsolidity/interface/Version.cpp +++ b/libsolidity/interface/Version.cpp @@ -24,7 +24,6 @@ #include <string> #include <libdevcore/CommonData.h> #include <libdevcore/Common.h> -#include <libevmasm/Version.h> #include <libsolidity/interface/Utils.h> #include <solidity/BuildInfo.h> @@ -39,8 +38,7 @@ string const dev::solidity::VersionString = "-" + string(DEV_QUOTED(ETH_COMMIT_HASH)).substr(0, 8) + (ETH_CLEAN_REPO ? "" : "*") + - "/" DEV_QUOTED(ETH_BUILD_TYPE) "-" DEV_QUOTED(ETH_BUILD_PLATFORM) - " linked to libethereum-" + eth::VersionStringLibEvmAsm; + "/" DEV_QUOTED(ETH_BUILD_TYPE) "-" DEV_QUOTED(ETH_BUILD_PLATFORM); bytes dev::solidity::binaryVersion() |