Browse Source

Moved instructions and assembly to new libevmcore.

cl-refactor
Christian 10 years ago
parent
commit
99882a76a7
  1. 2
      CMakeLists.txt
  2. 2
      alethzero/CMakeLists.txt
  3. 2
      eth/main.cpp
  4. 2
      iethxi/MainWin.cpp
  5. 2
      libethereum/Executive.h
  6. 2
      libethereum/State.cpp
  7. 2
      libevm/CMakeLists.txt
  8. 2
      libevm/ExtVMFace.h
  9. 2
      libevm/VM.h
  10. 0
      libevmcore/Assembly.cpp
  11. 2
      libevmcore/Assembly.h
  12. 2
      libevmcore/CMakeLists.txt
  13. 36
      libevmcore/Exceptions.h
  14. 0
      libevmcore/Instruction.cpp
  15. 7
      libevmcore/Instruction.h
  16. 1
      liblll/All.h
  17. 2
      liblll/CMakeLists.txt
  18. 2
      liblll/CodeFragment.cpp
  19. 4
      liblll/CodeFragment.h
  20. 3
      liblll/Exceptions.h
  21. 2
      libpyserpent/CMakeLists.txt
  22. 2
      libqethereum/QmlEthereum.cpp
  23. 2
      libserpent/CMakeLists.txt
  24. 3
      libsolidity/CMakeLists.txt
  25. 4
      libsolidity/CompilerContext.h
  26. 2
      libweb3jsonrpc/WebThreeStubServer.cpp
  27. 2
      lllc/CMakeLists.txt
  28. 2
      lllc/main.cpp
  29. 2
      neth/main.cpp
  30. 2
      sc/CMakeLists.txt
  31. 2
      test/createRandomTest.cpp
  32. 2
      test/vm.h
  33. 2
      third/CMakeLists.txt
  34. 2
      walleth/MainWin.cpp
  35. 8
      windows/LibEthereum.vcxproj
  36. 16
      windows/LibEthereum.vcxproj.filters

2
CMakeLists.txt

@ -106,7 +106,7 @@ include(EthDependenciesDeprecated)
createBuildInfo()
add_subdirectory(libdevcore)
add_subdirectory(libevmface)
add_subdirectory(libevmcore)
add_subdirectory(liblll)
add_subdirectory(libserpent)
add_subdirectory(libsolidity)

2
alethzero/CMakeLists.txt

@ -53,7 +53,7 @@ else ()
endif ()
qt5_use_modules(${EXECUTEABLE} Core)# Gui Widgets Network WebKit WebKitWidgets)
target_link_libraries(${EXECUTEABLE} webthree qethereum ethereum evm ethcore devcrypto secp256k1 gmp ${CRYPTOPP_LS} serpent lll solidity evmface devcore web3jsonrpc jsqrc)
target_link_libraries(${EXECUTEABLE} webthree qethereum ethereum evm ethcore devcrypto secp256k1 gmp ${CRYPTOPP_LS} serpent lll solidity evmcore devcore web3jsonrpc jsqrc)
if (APPLE)
# First have qt5 install plugins and frameworks

2
eth/main.cpp

@ -32,7 +32,7 @@
#include <libweb3jsonrpc/CorsHttpServer.h>
#endif
#include <libdevcrypto/FileSystem.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libevm/VM.h>
#include <libethereum/All.h>
#include <libwebthree/WebThree.h>

2
iethxi/MainWin.cpp

@ -9,7 +9,7 @@
#include <QtCore/QtCore>
#include <libethcore/FileSystem.h>
#include <libethcore/Dagger.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethereum/Client.h>
#include <libethereum/EthereumHost.h>
#include "BuildInfo.h"

2
libethereum/Executive.h

@ -23,7 +23,7 @@
#include <functional>
#include <libdevcore/Log.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethcore/CommonEth.h>
#include <libevm/ExtVMFace.h>
#include "Transaction.h"

2
libethereum/State.cpp

@ -26,7 +26,7 @@
#include <random>
#include <secp256k1/secp256k1.h>
#include <libdevcore/CommonIO.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethcore/Exceptions.h>
#include <libevm/VM.h>
#include "BlockChain.h"

2
libevm/CMakeLists.txt

@ -17,7 +17,7 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} ethcore)
target_link_libraries(${EXECUTABLE} devcrypto)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} secp256k1)
target_link_libraries(${EXECUTABLE} gmp)

2
libevm/ExtVMFace.h

@ -27,7 +27,7 @@
#include <libdevcore/CommonData.h>
#include <libdevcore/RLP.h>
#include <libdevcrypto/SHA3.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethcore/CommonEth.h>
#include <libethcore/BlockInfo.h>

2
libevm/VM.h

@ -24,7 +24,7 @@
#include <unordered_map>
#include <libdevcore/Exceptions.h>
#include <libethcore/CommonEth.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libdevcrypto/SHA3.h>
#include <libethcore/BlockInfo.h>
#include "FeeStructure.h"

0
liblll/Assembly.cpp → libevmcore/Assembly.cpp

2
liblll/Assembly.h → libevmcore/Assembly.h

@ -24,7 +24,7 @@
#include <iostream>
#include <sstream>
#include <libdevcore/Common.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include "Exceptions.h"
namespace dev

2
libevmface/CMakeLists.txt → libevmcore/CMakeLists.txt

@ -4,7 +4,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
aux_source_directory(. SRC_LIST)
set(EXECUTABLE evmface)
set(EXECUTABLE evmcore)
file(GLOB HEADERS "*.h")
if(ETH_STATIC)

36
libevmcore/Exceptions.h

@ -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 InvalidDeposit: virtual AssemblyException {};
struct InvalidOpcode: virtual AssemblyException {};
}
}

0
libevmface/Instruction.cpp → libevmcore/Instruction.cpp

7
libevmface/Instruction.h → libevmcore/Instruction.h

@ -22,18 +22,13 @@
#pragma once
#include <libdevcore/Common.h>
#include <libdevcore/Exceptions.h>
namespace boost { namespace spirit { class utree; } }
namespace sp = boost::spirit;
#include <libevmcore/Exceptions.h>
namespace dev
{
namespace eth
{
struct InvalidOpcode: virtual Exception {};
/// Virtual machine bytecode instruction.
enum class Instruction: uint8_t
{

1
liblll/All.h

@ -1,6 +1,5 @@
#pragma once
#include "Assembly.h"
#include "CodeFragment.h"
#include "Compiler.h"
#include "CompilerState.h"

2
liblll/CMakeLists.txt

@ -15,7 +15,7 @@ endif()
include_directories(..)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)

2
liblll/CodeFragment.cpp

@ -25,7 +25,7 @@
#include <boost/spirit/include/support_utree.hpp>
#include <libdevcore/Log.h>
#include <libdevcore/CommonIO.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include "CompilerState.h"
#include "Parser.h"
using namespace std;

4
liblll/CodeFragment.h

@ -22,8 +22,8 @@
#pragma once
#include <libdevcore/Common.h>
#include <libevmface/Instruction.h>
#include "Assembly.h"
#include <libevmcore/Instruction.h>
#include <libevmcore/Assembly.h>
#include "Exceptions.h"
namespace boost { namespace spirit { class utree; } }

3
liblll/Exceptions.h

@ -32,16 +32,13 @@ namespace eth
class CompilerException: public dev::Exception {};
class InvalidOperation: public CompilerException {};
class IntegerOutOfRange: public CompilerException {};
class StringTooLong: public CompilerException {};
class EmptyList: public CompilerException {};
class DataNotExecutable: public CompilerException {};
class IncorrectParameterCount: public CompilerException {};
class InvalidDeposit: public CompilerException {};
class InvalidName: public CompilerException {};
class InvalidMacroArgs: public CompilerException {};
class InvalidLiteral: public CompilerException {};
class BareSymbol: public CompilerException {};
class ExpectedLiteral: public CompilerException {};
}
}

2
libpyserpent/CMakeLists.txt

@ -13,7 +13,7 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} serpent)
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} ${PYTHON_LS})

2
libqethereum/QmlEthereum.cpp

@ -4,7 +4,7 @@
#include <QtCore/QtCore>
#include <QtWebKitWidgets/QWebFrame>
#include <libdevcrypto/FileSystem.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <liblll/Compiler.h>
#include <libethereum/Client.h>
#include <libethereum/EthereumHost.h>

2
libserpent/CMakeLists.txt

@ -16,7 +16,7 @@ endif()
include_directories(..)
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
if("${TARGET_PLATFORM}" STREQUAL "w64")

3
libsolidity/CMakeLists.txt

@ -16,8 +16,7 @@ file(GLOB HEADERS "*.h")
include_directories(..)
# @todo we only depend on Assembly, not on all of lll
target_link_libraries(${EXECUTABLE} evmface devcore lll)
target_link_libraries(${EXECUTABLE} evmcore devcore)
install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )

4
libsolidity/CompilerContext.h

@ -23,8 +23,8 @@
#pragma once
#include <ostream>
#include <libevmface/Instruction.h>
#include <liblll/Assembly.h>
#include <libevmcore/Instruction.h>
#include <libevmcore/Assembly.h>
#include <libsolidity/Types.h>
namespace dev {

2
libweb3jsonrpc/WebThreeStubServer.cpp

@ -22,7 +22,7 @@
*/
#include "WebThreeStubServer.h"
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <liblll/Compiler.h>
#include <libethereum/Client.h>
#include <libwebthree/WebThree.h>

2
lllc/CMakeLists.txt

@ -9,7 +9,7 @@ set(EXECUTABLE lllc)
add_executable(${EXECUTABLE} ${SRC_LIST})
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
if ("${TARGET_PLATFORM}" STREQUAL "w64")

2
lllc/main.cpp

@ -25,7 +25,7 @@
#include <liblll/Compiler.h>
#include <libdevcore/CommonIO.h>
#include <libdevcore/CommonData.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include "BuildInfo.h"
using namespace std;
using namespace dev;

2
neth/main.cpp

@ -30,7 +30,7 @@
#include <jsonrpc/connectors/httpserver.h>
#endif
#include <libdevcrypto/FileSystem.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethereum/All.h>
#if ETH_JSONRPC
#include <libweb3jsonrpc/WebThreeStubServer.h>

2
sc/CMakeLists.txt

@ -10,7 +10,7 @@ add_executable(${EXECUTABLE} ${SRC_LIST})
target_link_libraries(${EXECUTABLE} serpent)
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
if ("${TARGET_PLATFORM}" STREQUAL "w64")

2
test/createRandomTest.cpp

@ -31,7 +31,7 @@
#include <json_spirit/json_spirit_writer_template.h>
#include <libdevcore/CommonIO.h>
#include <libdevcore/CommonData.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include "vm.h"
using namespace std;

2
test/vm.h

@ -29,7 +29,7 @@ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
#include "JsonSpiritHeaders.h"
#include <libdevcore/Log.h>
#include <libdevcore/CommonIO.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libevm/ExtVMFace.h>
#include <libevm/VM.h>
#include <liblll/Compiler.h>

2
third/CMakeLists.txt

@ -53,7 +53,7 @@ else ()
endif ()
qt5_use_modules(${EXECUTEABLE} Core)# Gui Widgets Network WebKit WebKitWidgets)
target_link_libraries(${EXECUTEABLE} webthree qethereum ethereum evm ethcore secp256k1 gmp ${CRYPTOPP_LS} serpent lll evmface devcore web3jsonrpc jsqrc)
target_link_libraries(${EXECUTEABLE} webthree qethereum ethereum evm ethcore secp256k1 gmp ${CRYPTOPP_LS} serpent lll evmcore devcore web3jsonrpc jsqrc)
if (APPLE)
# First have qt5 install plugins and frameworks

2
walleth/MainWin.cpp

@ -9,7 +9,7 @@
#include <QtCore/QtCore>
#include <libdevcrypto/FileSystem.h>
#include <libethcore/Dagger.h>
#include <libevmface/Instruction.h>
#include <libevmcore/Instruction.h>
#include <libethereum/Client.h>
#include <libethereum/EthereumHost.h>
#include "BuildInfo.h"

8
windows/LibEthereum.vcxproj

@ -125,7 +125,7 @@
<ClCompile Include="..\libethereum\Transaction.cpp" />
<ClCompile Include="..\libethereum\TransactionQueue.cpp" />
<ClCompile Include="..\libethereum\Utility.cpp" />
<ClCompile Include="..\libevmface\Instruction.cpp" />
<ClCompile Include="..\libevmcore\Instruction.cpp" />
<ClCompile Include="..\libevm\ExtVMFace.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -341,7 +341,7 @@
<ClInclude Include="..\libethereum\Transaction.h" />
<ClInclude Include="..\libethereum\TransactionQueue.h" />
<ClInclude Include="..\libethereum\Utility.h" />
<ClInclude Include="..\libevmface\Instruction.h" />
<ClInclude Include="..\libevmcore\Instruction.h" />
<ClInclude Include="..\libevm\All.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -367,7 +367,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\liblll\All.h" />
<ClInclude Include="..\liblll\Assembly.h" />
<ClInclude Include="..\libevmcore\Assembly.h" />
<ClInclude Include="..\liblll\CodeFragment.h" />
<ClInclude Include="..\liblll\Compiler.h" />
<ClInclude Include="..\liblll\CompilerState.h" />
@ -567,4 +567,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

16
windows/LibEthereum.vcxproj.filters

@ -37,8 +37,8 @@
<ClCompile Include="..\libevm\VM.cpp">
<Filter>libevm</Filter>
</ClCompile>
<ClCompile Include="..\libevmface\Instruction.cpp">
<Filter>libevmface</Filter>
<ClCompile Include="..\libevmcore\Instruction.cpp">
<Filter>libevmcore</Filter>
</ClCompile>
<ClCompile Include="..\liblll\Assembly.cpp">
<Filter>liblll</Filter>
@ -243,14 +243,14 @@
<ClInclude Include="..\libevm\All.h">
<Filter>libevm</Filter>
</ClInclude>
<ClInclude Include="..\libevmface\Instruction.h">
<Filter>libevmface</Filter>
<ClInclude Include="..\libevmcore\Instruction.h">
<Filter>libevmcore</Filter>
</ClInclude>
<ClInclude Include="..\liblll\All.h">
<Filter>liblll</Filter>
</ClInclude>
<ClInclude Include="..\liblll\Assembly.h">
<Filter>liblll</Filter>
<ClInclude Include="..\libevmcore\Assembly.h">
<Filter>libevmcore</Filter>
</ClInclude>
<ClInclude Include="..\liblll\CodeFragment.h">
<Filter>liblll</Filter>
@ -449,7 +449,7 @@
<Filter Include="libevm">
<UniqueIdentifier>{37c37803-1515-47c1-b7e6-3879f4429ab3}</UniqueIdentifier>
</Filter>
<Filter Include="libevmface">
<Filter Include="libevmcore">
<UniqueIdentifier>{ed9ad1b3-700c-47f9-8548-a90b5ef179ac}</UniqueIdentifier>
</Filter>
<Filter Include="liblll">
@ -471,4 +471,4 @@
<UniqueIdentifier>{d838fece-fc20-42f6-bff5-97c236159b80}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
</Project>

Loading…
Cancel
Save