CJentzsch
10 years ago
133 changed files with 1859 additions and 682 deletions
@ -0,0 +1,33 @@ |
|||
cmake_policy(SET CMP0015 NEW) |
|||
# this policy was introduced in cmake 3.0 |
|||
# remove if, once 3.0 will be used on unix |
|||
if (${CMAKE_MAJOR_VERSION} GREATER 2) |
|||
# old policy do not use MACOSX_RPATH |
|||
cmake_policy(SET CMP0042 OLD) |
|||
endif() |
|||
set(CMAKE_AUTOMOC OFF) |
|||
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") |
|||
|
|||
aux_source_directory(. SRC_LIST) |
|||
|
|||
include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS}) |
|||
include_directories(BEFORE ..) |
|||
include_directories(${Boost_INCLUDE_DIRS}) |
|||
|
|||
set(EXECUTABLE evmasm) |
|||
|
|||
file(GLOB HEADERS "*.h") |
|||
|
|||
if (ETH_STATIC) |
|||
add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) |
|||
else() |
|||
add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) |
|||
endif() |
|||
|
|||
target_link_libraries(${EXECUTABLE} evmcore) |
|||
target_link_libraries(${EXECUTABLE} devcrypto) |
|||
|
|||
install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) |
|||
install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) |
|||
|
@ -0,0 +1,36 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Exceptions.h
|
|||
* @author Christian <c@ethdev.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <libdevcore/Exceptions.h> |
|||
|
|||
namespace dev |
|||
{ |
|||
namespace eth |
|||
{ |
|||
|
|||
struct AssemblyException: virtual Exception {}; |
|||
struct OptimizerException: virtual AssemblyException {}; |
|||
struct StackTooDeepException: virtual OptimizerException {}; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Params.cpp
|
|||
* @author Gav Wood <i@gavwood.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#include "Params.h" |
|||
|
|||
using namespace std; |
|||
namespace dev |
|||
{ |
|||
namespace eth |
|||
{ |
|||
|
|||
//--- BEGIN: AUTOGENERATED FROM github.com/ethereum/common/params.json
|
|||
u256 const c_stackLimit = 1024; |
|||
u256 const c_tierStepGas[] = {0, 2, 3, 5, 8, 10, 20, 0}; |
|||
u256 const c_expGas = 10; |
|||
u256 const c_expByteGas = 10; |
|||
u256 const c_sha3Gas = 30; |
|||
u256 const c_sha3WordGas = 6; |
|||
u256 const c_sloadGas = 50; |
|||
u256 const c_sstoreSetGas = 20000; |
|||
u256 const c_sstoreResetGas = 5000; |
|||
u256 const c_sstoreRefundGas = 15000; |
|||
u256 const c_jumpdestGas = 1; |
|||
u256 const c_logGas = 375; |
|||
u256 const c_logDataGas = 8; |
|||
u256 const c_logTopicGas = 375; |
|||
u256 const c_createGas = 32000; |
|||
u256 const c_callGas = 40; |
|||
u256 const c_callStipend = 2300; |
|||
u256 const c_callValueTransferGas = 9000; |
|||
u256 const c_callNewAccountGas = 25000; |
|||
u256 const c_suicideRefundGas = 24000; |
|||
u256 const c_memoryGas = 3; |
|||
u256 const c_quadCoeffDiv = 512; |
|||
u256 const c_createDataGas = 200; |
|||
u256 const c_txGas = 21000; |
|||
u256 const c_txDataZeroGas = 4; |
|||
u256 const c_txDataNonZeroGas = 68; |
|||
u256 const c_copyGas = 3; |
|||
u256 const c_ecrecoverGas = 3000; |
|||
u256 const c_sha256Gas = 60; |
|||
u256 const c_sha256WordGas = 12; |
|||
u256 const c_ripemd160Gas = 600; |
|||
u256 const c_ripemd160WordGas = 120; |
|||
u256 const c_identityGas = 15; |
|||
u256 const c_identityWordGas = 3; |
|||
//--- END: AUTOGENERATED FROM /feeStructure.json
|
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,69 @@ |
|||
/*
|
|||
This file is part of cpp-ethereum. |
|||
|
|||
cpp-ethereum is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
cpp-ethereum is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
/** @file Params.h
|
|||
* @author Gav Wood <i@gavwood.com> |
|||
* @date 2014 |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <libdevcore/Common.h> |
|||
|
|||
namespace dev |
|||
{ |
|||
namespace eth |
|||
{ |
|||
|
|||
//--- BEGIN: AUTOGENERATED FROM /feeStructure.json
|
|||
extern u256 const c_stackLimit; |
|||
|
|||
extern u256 const c_tierStepGas[8]; ///< Once per operation, for a selection of them.
|
|||
extern u256 const c_expGas; ///< Once per EXP instuction.
|
|||
extern u256 const c_expByteGas; ///< Times ceil(log256(exponent)) for the EXP instruction.
|
|||
extern u256 const c_sha3Gas; ///< Once per SHA3 operation.
|
|||
extern u256 const c_sha3WordGas; ///< Once per word of the SHA3 operation's data.
|
|||
extern u256 const c_copyGas; ///< Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added.
|
|||
extern u256 const c_sloadGas; ///< Once per SLOAD operation.
|
|||
extern u256 const c_sstoreSetGas; ///< Once per SSTORE operation if the zeroness changes from zero.
|
|||
extern u256 const c_sstoreResetGas; ///< Once per SSTORE operation if the zeroness does not change from zero. NOTE: when c_sstoreSetGas does not apply.
|
|||
extern u256 const c_sstoreRefundGas; ///< Refunded gas, once per SSTORE operation if the zeroness changes to zero.
|
|||
extern u256 const c_jumpdestGas; ///< Once per JUMPDEST operation.
|
|||
extern u256 const c_logGas; ///< Per LOG* operation.
|
|||
extern u256 const c_logDataGas; ///< Per byte in a LOG* operation's data.
|
|||
extern u256 const c_logTopicGas; ///< Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas.
|
|||
extern u256 const c_createGas; ///< Once per CREATE operation & contract-creation transaction.
|
|||
extern u256 const c_createDataGas; |
|||
extern u256 const c_callGas; ///< Once per CALL operation & message call transaction.
|
|||
extern u256 const c_callStipend; ///< Free gas given at beginning of call.
|
|||
extern u256 const c_callNewAccountGas; ///< Paid for CALL when the destination address didn't exist prior.
|
|||
extern u256 const c_callValueTransferGas; ///< Paid for CALL when the value transfor is non-zero.
|
|||
extern u256 const c_suicideRefundGas; ///< Refunded following a suicide operation.
|
|||
extern u256 const c_memoryGas; ///< Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL.
|
|||
extern u256 const c_quadCoeffDiv; ///< Divisor for the quadratic particle of the memory cost equation.
|
|||
extern u256 const c_txGas; ///< Per transaction. NOTE: Not payable on data of calls between transactions.
|
|||
extern u256 const c_txDataZeroGas; ///< Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions.
|
|||
extern u256 const c_txDataNonZeroGas; ///< Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions.
|
|||
extern u256 const c_ecrecoverGas; |
|||
extern u256 const c_sha256Gas; |
|||
extern u256 const c_sha256WordGas; |
|||
extern u256 const c_ripemd160Gas; |
|||
extern u256 const c_ripemd160WordGas; |
|||
extern u256 const c_identityGas; |
|||
extern u256 const c_identityWordGas; |
|||
|
|||
} |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue