Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Move interpreter to its own aleth-interpreter library
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jun 20, 2018
1 parent bcc98a3 commit df51734
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -123,6 +123,8 @@ endif()
#Global include path for all libs.
include_directories("${CMAKE_SOURCE_DIR}")

add_subdirectory(libaleth-interpreter)

add_subdirectory(libdevcore)
add_subdirectory(libdevcrypto)
add_subdirectory(libp2p)
Expand Down
1 change: 0 additions & 1 deletion aleth-vm/main.cpp
Expand Up @@ -28,7 +28,6 @@
#include <libethereum/ChainParams.h>
#include <libethereum/Executive.h>
#include <libethereum/LastBlockHashesFace.h>
#include <libevm/VM.h>
#include <libevm/VMFactory.h>

#include <aleth-buildinfo.h>
Expand Down
1 change: 0 additions & 1 deletion aleth/main.cpp
Expand Up @@ -40,7 +40,6 @@
#include <libethereum/Defaults.h>
#include <libethereum/SnapshotImporter.h>
#include <libethereum/SnapshotStorage.h>
#include <libevm/VM.h>
#include <libevm/VMFactory.h>
#include <libwebthree/WebThree.h>

Expand Down
16 changes: 16 additions & 0 deletions libaleth-interpreter/CMakeLists.txt
@@ -0,0 +1,16 @@
# Aleth: Ethereum C++ client, tools and libraries.
# Copyright 2018 Aleth Autors.
# Licensed under the GNU General Public License, Version 3. See the LICENSE file.

add_library(
aleth-interpreter
interpreter.h
VM.cpp
VM.h
VMCalls.cpp
VMConfig.h
VMOpt.cpp
VMSIMD.cpp
VMValidate.cpp
)
target_link_libraries(aleth-interpreter PRIVATE devcore aleth-buildinfo evmc::evmc evmc::instructions)
File renamed without changes.
5 changes: 3 additions & 2 deletions libevm/VM.h → libaleth-interpreter/VM.h
Expand Up @@ -17,9 +17,10 @@

#pragma once

#include "Instruction.h"
#include "VMConfig.h"
#include "VMFace.h"

#include <libevm/VMFace.h>
#include <libevm/Instruction.h>

#include <evmc/evmc.h>
#include <evmc/instructions.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 2 additions & 9 deletions libevm/CMakeLists.txt
Expand Up @@ -3,26 +3,19 @@ set(sources
EVMC.cpp EVMC.h
ExtVMFace.cpp ExtVMFace.h
Instruction.cpp Instruction.h
interpreter.h
LegacyVM.cpp LegacyVM.h
LegacyVMCalls.cpp
LegacyVMOpt.cpp
VMFace.h
VMConfig.h
VM.cpp VM.h
VMCalls.cpp
VMOpt.cpp
VMSIMD.cpp
VMValidate.cpp
VMFactory.cpp VMFactory.h
)

add_library(evm ${sources})

target_link_libraries(
evm
PUBLIC ethcore devcore evmc::evmc evmc::instructions
PRIVATE aleth-buildinfo jsoncpp_lib_static Boost::program_options ${CMAKE_DL_LIBS}
PUBLIC ethcore devcore evmc::evmc
PRIVATE aleth-interpreter aleth-buildinfo jsoncpp_lib_static Boost::program_options ${CMAKE_DL_LIBS}
)

if(EVM_OPTIMIZE)
Expand Down
1 change: 0 additions & 1 deletion libevm/EVMC.cpp
Expand Up @@ -4,7 +4,6 @@
#include "EVMC.h"

#include <libdevcore/Log.h>
#include <libevm/VM.h>
#include <libevm/VMFactory.h>

namespace dev
Expand Down
3 changes: 2 additions & 1 deletion libevm/LegacyVM.h
Expand Up @@ -18,9 +18,10 @@
#pragma once

#include "Instruction.h"
#include "VMConfig.h"
#include "VMFace.h"

#include <libaleth-interpreter/VMConfig.h>

namespace dev
{
namespace eth
Expand Down
3 changes: 2 additions & 1 deletion libevm/VMFactory.cpp
Expand Up @@ -18,7 +18,8 @@
#include "VMFactory.h"
#include "EVMC.h"
#include "LegacyVM.h"
#include "interpreter.h"

#include <libaleth-interpreter/interpreter.h>

#include <boost/dll.hpp>
#include <boost/filesystem.hpp>
Expand Down
1 change: 0 additions & 1 deletion test/tools/jsontests/StateTests.cpp
Expand Up @@ -29,7 +29,6 @@
#include <libethereum/State.h>
#include <libethereum/ExtVM.h>
#include <libethereum/Defaults.h>
#include <libevm/VM.h>
#include <test/tools/libtesteth/TestHelper.h>
#include <test/tools/libtesteth/TestSuite.h>
#include <test/tools/jsontests/StateTests.h>
Expand Down
1 change: 0 additions & 1 deletion test/tools/jsontests/vm.h
Expand Up @@ -27,7 +27,6 @@ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
#include <libdevcore/Log.h>
#include <libdevcore/CommonIO.h>
#include <libevm/ExtVMFace.h>
#include <libevm/VM.h>
#include <libethereum/Transaction.h>
#include <libethereum/ExtVM.h>
#include <libethereum/State.h>
Expand Down

0 comments on commit df51734

Please sign in to comment.