Browse Source

Merge branch 'develop' into p2p

Conflicts:
	libp2p/Host.cpp
	libp2p/Host.h
cl-refactor
subtly 10 years ago
parent
commit
ec5a7e6a61
  1. 1
      alethzero/CMakeLists.txt
  2. 13
      alethzero/MainWin.cpp
  3. 1
      alethzero/MainWin.h
  4. 3
      alethzero/Transact.cpp
  5. 2
      cmake/EthCompilerSettings.cmake
  6. 2
      cmake/FindJsonRpcCpp.cmake
  7. 20
      docker/Dockerfile
  8. 2
      eth/CMakeLists.txt
  9. 18
      eth/main.cpp
  10. 1
      evmjit/evmcc/test/arith/addmod.evm
  11. 12
      evmjit/evmcc/test/arith/addmod.lll
  12. 1
      evmjit/evmcc/test/arith/arith1.evm
  13. 37
      evmjit/evmcc/test/arith/arith1.lll
  14. 1
      evmjit/evmcc/test/arith/arith_bnot.evm
  15. 14
      evmjit/evmcc/test/arith/arith_bnot.lll
  16. 1
      evmjit/evmcc/test/arith/div.evm
  17. 10
      evmjit/evmcc/test/arith/div.lll
  18. 1
      evmjit/evmcc/test/arith/fib1.evm
  19. 57
      evmjit/evmcc/test/arith/fib1.lll
  20. 1
      evmjit/evmcc/test/arith/mul.evm
  21. 13
      evmjit/evmcc/test/arith/mul.lll
  22. 1
      evmjit/evmcc/test/arith/mulmod.evm
  23. 12
      evmjit/evmcc/test/arith/mulmod.lll
  24. 1
      evmjit/evmcc/test/except/badinst1.evm
  25. 1
      evmjit/evmcc/test/ext/calldatacopy1.evm
  26. 13
      evmjit/evmcc/test/ext/calldatacopy1.lll
  27. 1
      evmjit/evmcc/test/ext/calldatacopy2.evm
  28. 13
      evmjit/evmcc/test/ext/calldatacopy2.lll
  29. 1
      evmjit/evmcc/test/ext/codecopy1.evm
  30. 13
      evmjit/evmcc/test/ext/codecopy1.lll
  31. 1
      evmjit/evmcc/test/ext/codecopy2.evm
  32. 13
      evmjit/evmcc/test/ext/codecopy2.lll
  33. 1
      evmjit/evmcc/test/ext/codecopy3.evm
  34. 13
      evmjit/evmcc/test/ext/codecopy3.lll
  35. 1
      evmjit/evmcc/test/ext/ext_test.evm
  36. 55
      evmjit/evmcc/test/ext/ext_test.lll
  37. 1
      evmjit/evmcc/test/ext/extcodecopy1.evm
  38. 11
      evmjit/evmcc/test/ext/extcodecopy1.lll
  39. 1
      evmjit/evmcc/test/ext/store_delete.evm
  40. 9
      evmjit/evmcc/test/ext/store_delete.lll
  41. 1
      evmjit/evmcc/test/ext/store_test.evm
  42. 14
      evmjit/evmcc/test/ext/store_test.lll
  43. 7
      evmjit/evmcc/test/jump/ackermann.ethel
  44. 1
      evmjit/evmcc/test/jump/ackermann.evm
  45. 1
      evmjit/evmcc/test/jump/badindirect1.evm
  46. 9
      evmjit/evmcc/test/jump/badindirect1.lll
  47. 1
      evmjit/evmcc/test/jump/badindirect2.evm
  48. 12
      evmjit/evmcc/test/jump/badindirect2.lll
  49. 1
      evmjit/evmcc/test/jump/badjump1.evm
  50. 6
      evmjit/evmcc/test/jump/badjump1.lll
  51. 1
      evmjit/evmcc/test/jump/badjump2.evm
  52. 9
      evmjit/evmcc/test/jump/badjump2.lll
  53. 5
      evmjit/evmcc/test/jump/call1.ethel
  54. 1
      evmjit/evmcc/test/jump/call1.evm
  55. 5
      evmjit/evmcc/test/jump/call2.ethel
  56. 1
      evmjit/evmcc/test/jump/call2.evm
  57. 5
      evmjit/evmcc/test/jump/fac.ethel
  58. 1
      evmjit/evmcc/test/jump/fac.evm
  59. 5
      evmjit/evmcc/test/jump/fac_tail.ethel
  60. 1
      evmjit/evmcc/test/jump/fac_tail.evm
  61. 6
      evmjit/evmcc/test/jump/fib1.ethel
  62. 1
      evmjit/evmcc/test/jump/fib1.evm
  63. 1
      evmjit/evmcc/test/jump/for1.evm
  64. 3
      evmjit/evmcc/test/jump/for1.lll
  65. 1
      evmjit/evmcc/test/jump/for2.evm
  66. 3
      evmjit/evmcc/test/jump/for2.lll
  67. 1
      evmjit/evmcc/test/jump/if1.ethel
  68. 1
      evmjit/evmcc/test/jump/if1.evm
  69. 1
      evmjit/evmcc/test/jump/if2.ethel
  70. 1
      evmjit/evmcc/test/jump/if2.evm
  71. 1
      evmjit/evmcc/test/jump/indirect1.evm
  72. 13
      evmjit/evmcc/test/jump/indirect1.lll
  73. 1
      evmjit/evmcc/test/jump/indirect2.evm
  74. 19
      evmjit/evmcc/test/jump/indirect2.lll
  75. 1
      evmjit/evmcc/test/jump/indirect3.evm
  76. 14
      evmjit/evmcc/test/jump/indirect3.lll
  77. 1
      evmjit/evmcc/test/jump/indirect4.evm
  78. 15
      evmjit/evmcc/test/jump/indirect4.lll
  79. 1
      evmjit/evmcc/test/jump/jump1.evm
  80. 11
      evmjit/evmcc/test/jump/jump1.lll
  81. 1
      evmjit/evmcc/test/jump/jump2.evm
  82. 10
      evmjit/evmcc/test/jump/jump2.lll
  83. 1
      evmjit/evmcc/test/jump/jump3.evm
  84. 10
      evmjit/evmcc/test/jump/jump3.lll
  85. 1
      evmjit/evmcc/test/jump/jump4.evm
  86. 17
      evmjit/evmcc/test/jump/jump4.lll
  87. 1
      evmjit/evmcc/test/jump/jump5.evm
  88. 16
      evmjit/evmcc/test/jump/jump5.lll
  89. 1
      evmjit/evmcc/test/jump/jump6.evm
  90. 32
      evmjit/evmcc/test/jump/jump6.lll
  91. 1
      evmjit/evmcc/test/jump/jumpi_at_the_end.evm
  92. 1
      evmjit/evmcc/test/jump/jumpi_at_the_end.lll
  93. 1
      evmjit/evmcc/test/jump/loop1.evm
  94. 27
      evmjit/evmcc/test/jump/loop1.lll
  95. 1
      evmjit/evmcc/test/jump/loop2.evm
  96. 28
      evmjit/evmcc/test/jump/loop2.lll
  97. 4
      evmjit/evmcc/test/jump/rec1.ethel
  98. 1
      evmjit/evmcc/test/jump/rec1.evm
  99. 10
      evmjit/evmcc/test/jump/when1.asm
  100. 1
      evmjit/evmcc/test/jump/when1.evm

1
alethzero/CMakeLists.txt

@ -13,6 +13,7 @@ aux_source_directory(. SRC_LIST)
include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS})
include_directories(BEFORE ..)
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
qt5_wrap_ui(ui_Main.h Main.ui)
qt5_wrap_ui(ui_Debugger.h Debugger.ui)

13
alethzero/MainWin.cpp

@ -20,6 +20,10 @@
*/
#include <fstream>
// Make sure boost/asio.hpp is included before windows.h.
#include <boost/asio.hpp>
#include <QtNetwork/QNetworkReply>
#include <QtWidgets/QFileDialog>
#include <QtWidgets/QMessageBox>
@ -1382,11 +1386,16 @@ void Main::on_blocks_currentItemChanged()
s << "<br/>Pre: <b>" << BlockInfo(ethereum()->blockChain().block(info.parentHash)).stateRoot << "</b>";
else
s << "<br/>Pre: <i>Nothing is before Phil</i>";
BlockReceipts receipts = ethereum()->blockChain().receipts(h);
unsigned ii = 0;
for (auto const& i: block[1])
s << "<br/>" << sha3(i.data()).abridged();// << ": <b>" << i[1].toHash<h256>() << "</b> [<b>" << i[2].toInt<u256>() << "</b> used]";
{
s << "<br/>" << sha3(i.data()).abridged() << ": <b>" << receipts.receipts[ii].stateRoot() << "</b> [<b>" << receipts.receipts[ii].gasUsed() << "</b> used]";
++ii;
}
s << "<br/>Post: <b>" << info.stateRoot << "</b>";
s << "<br/>Dump: " Span(Mono) << toHex(block[0].data()) << "</span>";
s << "<div>Receipts-Hex: " Span(Mono) << toHex(ethereum()->blockChain().receipts(h).rlp()) << "</span></div>";
s << "<div>Receipts-Hex: " Span(Mono) << toHex(receipts.rlp()) << "</span></div>";
}
else
{

1
alethzero/MainWin.h

@ -26,6 +26,7 @@
#endif
#include <map>
#include <QtNetwork/QNetworkAccessManager>
#include <QtCore/QAbstractListModel>
#include <QtCore/QMutex>

3
alethzero/Transact.cpp

@ -19,6 +19,9 @@
* @date 2015
*/
// Make sure boost/asio.hpp is included before windows.h.
#include <boost/asio.hpp>
#include "Transact.h"
#include <fstream>

2
cmake/EthCompilerSettings.cmake

@ -3,7 +3,7 @@
# C++11 check and activation
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -Werror -DSHAREDLIB -fPIC ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG -DETH_RELEASE")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -DETH_RELEASE")

2
cmake/FindJsonRpcCpp.cmake

@ -14,7 +14,7 @@
# only look in default directories
find_path(
JSON_RPC_CPP_INCLUDE_DIR
NAMES jsonrpccpp/server.h
NAMES jsonrpccpp/server.h jsonrpc/server.h
PATH_SUFFIXES jsonrpc
DOC "json-rpc-cpp include dir"
)

20
docker/Dockerfile

@ -8,23 +8,29 @@ RUN apt-get upgrade -y
RUN apt-get install -qy build-essential g++-4.8 git cmake libboost-all-dev libcurl4-openssl-dev wget
RUN apt-get install -qy automake unzip libgmp-dev libtool libleveldb-dev yasm libminiupnpc-dev libreadline-dev scons
RUN apt-get install -qy libjsoncpp-dev libargtable2-dev
# NCurses based GUI (not optional though for a succesful compilation, see https://github.com/ethereum/cpp-ethereum/issues/452 )
RUN apt-get install -qy libncurses5-dev
# Qt-based GUI
# RUN apt-get install -qy qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev
RUN apt-get install -qy libncurses5-dev libcurl4-openssl-dev wget
RUN apt-get install -qy libjsoncpp-dev libargtable2-dev libmicrohttpd-dev
# Ethereum PPA
RUN apt-get install -qy software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN add-apt-repository ppa:ethereum/ethereum-dev
RUN apt-get update
RUN apt-get install -qy libcryptopp-dev libjson-rpc-cpp-dev
# LLVM-3.5
RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
RUN echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main\ndeb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main" > /etc/apt/sources.list.d/llvm-trusty.list
RUN apt-get update
RUN apt-get install -qy llvm-3.5 libedit-dev
# Fix llvm-3.5 cmake paths
RUN mkdir -p /usr/lib/llvm-3.5/share/llvm && ln -s /usr/share/llvm-3.5/cmake /usr/lib/llvm-3.5/share/llvm/cmake
# Build Ethereum (HEADLESS)
RUN git clone --depth=1 https://github.com/ethereum/cpp-ethereum
RUN mkdir -p cpp-ethereum/build
RUN cd cpp-ethereum/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install
RUN cd cpp-ethereum/build && cmake .. -DHEADLESS=1 -DLLVM_DIR=/usr/share/llvm-3.5/cmake -DEVMJIT=1 && make -j $(cat /proc/cpuinfo | grep processor | wc -l) && make install
RUN ldconfig
ENTRYPOINT ["/usr/local/bin/eth"]

2
eth/CMakeLists.txt

@ -28,7 +28,7 @@ endif()
target_link_libraries(${EXECUTABLE} webthree)
target_link_libraries(${EXECUTABLE} secp256k1)
if (WIN32)
if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW)
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${MHD_DLL_RELEASE} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
endif()

18
eth/main.cpp

@ -25,10 +25,13 @@
#include <fstream>
#include <iostream>
#include <signal.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/trim_all.hpp>
#include <libdevcrypto/FileSystem.h>
#include <libevmcore/Instruction.h>
#include <libdevcore/StructuredLogger.h>
#include <libevm/VM.h>
#include <libevm/VMFactory.h>
#include <libethereum/All.h>
@ -119,6 +122,8 @@ void help()
<< " -p,--port <port> Connect to remote port (default: 30303)." << endl
<< " -r,--remote <host> Connect to remote host (default: none)." << endl
<< " -s,--secret <secretkeyhex> Set the secret key for use with send command (default: auto)." << endl
<< " --structured-logging Enables structured logging." << endl
<< " --structured-logging-format <time-format> Give time format string for structured logging output." << endl
<< " -t,--miners <number> Number of mining threads to start (Default: " << thread::hardware_concurrency() << ")" << endl
<< " -u,--public-ip <ip> Force public ip to given (default; auto)." << endl
<< " -v,--verbosity <0 - 9> Set the log verbosity from 0 to 9 (Default: 8)." << endl
@ -207,6 +212,8 @@ int main(int argc, char** argv)
bool useLocal = false;
bool forceMining = false;
bool jit = false;
bool structuredLogging = false;
string structuredLoggingFormat = "%Y-%m-%dT%H:%M:%S";
string clientName;
// Init defaults
@ -279,6 +286,10 @@ int main(int argc, char** argv)
}
else if ((arg == "-s" || arg == "--secret") && i + 1 < argc)
us = KeyPair(h256(fromHex(argv[++i])));
else if (arg == "--structured-logging-format" && i + 1 < argc)
structuredLoggingFormat = string(argv[++i]);
else if (arg == "--structured-logging")
structuredLogging = true;
else if ((arg == "-d" || arg == "--path" || arg == "--db-path") && i + 1 < argc)
dbPath = argv[++i];
else if ((arg == "-m" || arg == "--mining") && i + 1 < argc)
@ -350,11 +361,13 @@ int main(int argc, char** argv)
cout << credits();
StructuredLogger::get().initialize(structuredLogging, structuredLoggingFormat);
VMFactory::setKind(jit ? VMKind::JIT : VMKind::Interpreter);
NetworkPreferences netPrefs(listenPort, publicIP, upnp, useLocal);
auto nodesState = contents((dbPath.size() ? dbPath : getDataDir()) + "/network.rlp");
std::string clientImplString = "Ethereum(++)/" + clientName + "v" + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) + (jit ? "/JIT" : "");
dev::WebThreeDirect web3(
"Ethereum(++)/" + clientName + "v" + dev::Version + "/" DEV_QUOTED(ETH_BUILD_TYPE) "/" DEV_QUOTED(ETH_BUILD_PLATFORM) + (jit ? "/JIT" : ""),
clientImplString,
dbPath,
false,
mode == NodeMode::Full ? set<string>{"eth", "shh"} : set<string>(),
@ -364,7 +377,7 @@ int main(int argc, char** argv)
);
web3.setIdealPeerCount(peers);
eth::Client* c = mode == NodeMode::Full ? web3.ethereum() : nullptr;
StructuredLogger::starting(clientImplString, dev::Version);
if (c)
{
c->setForceMining(forceMining);
@ -898,6 +911,7 @@ int main(int argc, char** argv)
while (!g_exit)
this_thread::sleep_for(chrono::milliseconds(1000));
StructuredLogger::stopping(clientImplString, dev::Version);
auto netData = web3.saveNetwork();
if (!netData.empty())
writeFile((dbPath.size() ? dbPath : getDataDir()) + "/network.rlp", netData);

1
evmjit/evmcc/test/arith/addmod.evm

@ -1 +0,0 @@
60646107b760271460005560006001f2

12
evmjit/evmcc/test/arith/addmod.lll

@ -1,12 +0,0 @@
;; Should return (1975 + 39) `mod` 100 = 14 = 0x0e
(asm
100
1975
39
ADDMOD
0
MSTORE8
0
1
RETURN
)

1
evmjit/evmcc/test/arith/arith1.evm

@ -1 +0,0 @@
60016001900160070260050160029004600490066021900560150160030260059007600303600960110860005460086000f2

37
evmjit/evmcc/test/arith/arith1.lll

@ -1,37 +0,0 @@
(asm
1
1
SWAP1
ADD ;; 2
7
MUL ;; 14
5
ADD ;; 19
2
SWAP1
DIV ;; 9
4
SWAP1
MOD ;; 1
33
SWAP1
SDIV;; 0
21
ADD ;; 21
3
MUL ;; 63
5
SWAP1
SMOD;; 3
3
SUB ;; 0
9
17
EXP ;; 17^9
0
MSTORE
8
0
RETURN
)

1
evmjit/evmcc/test/arith/arith_bnot.evm

@ -1 +0,0 @@
6201e2406000546000530960005460206000f2

14
evmjit/evmcc/test/arith/arith_bnot.lll

@ -1,14 +0,0 @@
(asm
123456
0
MSTORE
0
MLOAD
BNOT
0
MSTORE
32
0
RETURN
)

1
evmjit/evmcc/test/arith/div.evm

@ -1 +0,0 @@
60027ffedcba9876543210fedcba9876543210fedcba9876543210fedcba98765432100460005460206000f2

10
evmjit/evmcc/test/arith/div.lll

@ -1,10 +0,0 @@
(asm
0x2
0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
DIV
0
MSTORE
32
0
RETURN
)

1
evmjit/evmcc/test/arith/fib1.evm

@ -1 +0,0 @@
60016001818101818101818101818101818101818101818101818101818101818101818101818101818101818101818101818101818101

57
evmjit/evmcc/test/arith/fib1.lll

@ -1,57 +0,0 @@
;; Fibbonacci unrolled
(asm
1
1
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
DUP2
DUP2
ADD
)

1
evmjit/evmcc/test/arith/mul.evm

@ -1 +0,0 @@
7001234567890abcdef0fedcba09876543217001234567890abcdef0fedcba09876543217001234567890abcdef0fedcba0987654321020260005460206000f2

13
evmjit/evmcc/test/arith/mul.lll

@ -1,13 +0,0 @@
(asm
0x1234567890abcdef0fedcba0987654321
0x1234567890abcdef0fedcba0987654321
0x1234567890abcdef0fedcba0987654321
MUL
MUL
0
MSTORE
32
0
RETURN
;; 47d0817e4167b1eb4f9fc722b133ef9d7d9a6fb4c2c1c442d000107a5e419561
)

1
evmjit/evmcc/test/arith/mulmod.evm

@ -1 +0,0 @@
6064601b60251560005560006001f2

12
evmjit/evmcc/test/arith/mulmod.lll

@ -1,12 +0,0 @@
;; Should return (27 * 37) `mod` 100 = 99 = 0x63
(asm
100
27
37
MULMOD
0
MSTORE8
0
1
RETURN
)

1
evmjit/evmcc/test/except/badinst1.evm

@ -1 +0,0 @@
4a

1
evmjit/evmcc/test/ext/calldatacopy1.evm

@ -1 +0,0 @@
60326000600a37600053600a6014f2

13
evmjit/evmcc/test/ext/calldatacopy1.lll

@ -1,13 +0,0 @@
(asm
50 ;; byte count
0 ;; source index in calldata array
10 ;; dest index in memory
CALLDATACOPY
0
MLOAD ;; to dump memory
10
20
RETURN
)

1
evmjit/evmcc/test/ext/calldatacopy2.evm

@ -1 +0,0 @@
606464e8d4a510006000376000536000600af2

13
evmjit/evmcc/test/ext/calldatacopy2.lll

@ -1,13 +0,0 @@
(asm
100 ;; byte count
1000000000000 ;; source index in calldata array
0 ;; dest index in memory
CALLDATACOPY
0
MLOAD ;; to dump memory
0
10
RETURN
)

1
evmjit/evmcc/test/ext/codecopy1.evm

@ -1 +0,0 @@
60146000600a39600053600a6014f2

13
evmjit/evmcc/test/ext/codecopy1.lll

@ -1,13 +0,0 @@
(asm
20 ;; byte count
0 ;; source index in code array
10 ;; dest index in memory
CODECOPY
0
MLOAD ;; to dump memory
10
20
RETURN
)

1
evmjit/evmcc/test/ext/codecopy2.evm

@ -1 +0,0 @@
606464e8d4a510006000396000536000600af2

13
evmjit/evmcc/test/ext/codecopy2.lll

@ -1,13 +0,0 @@
(asm
100 ;; byte count
1000000000000 ;; source index in code array
0 ;; dest index in memory
CODECOPY
0
MLOAD ;; to dump memory
0
10
RETURN
)

1
evmjit/evmcc/test/ext/codecopy3.evm

@ -1 +0,0 @@
3860006000396000536000600af2

13
evmjit/evmcc/test/ext/codecopy3.lll

@ -1,13 +0,0 @@
(asm
CODESIZE ;; byte count
0 ;; source index in code array
0 ;; dest index in memory
CODECOPY
0
MLOAD ;; to dump memory
0
10
RETURN
)

1
evmjit/evmcc/test/ext/ext_test.evm

@ -1 +0,0 @@
5a3031333234363a4041424344455a36600035602635601335387f1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff600054602060006000f06020600060206000600030610bb8f1600053611000545b60200260002030ff60016002f2

55
evmjit/evmcc/test/ext/ext_test.lll

@ -1,55 +0,0 @@
(asm
PC
ADDRESS
BALANCE
CALLER
ORIGIN
CALLVALUE
CALLDATASIZE
GASPRICE
PREVHASH
COINBASE
TIMESTAMP
NUMBER
DIFFICULTY
GASLIMIT
PC
CALLDATASIZE
0
CALLDATALOAD
38
CALLDATALOAD
19
CALLDATALOAD
CODESIZE
0x1111222233334444555566667777888899990000aaaabbbbccccddddeeeeffff
0
MSTORE
32
0
0
CREATE
32
0
32
0
0
ADDRESS
3000
CALL
0
MLOAD
4096
MSTORE
MSIZE
32
MUL
0
SHA3
ADDRESS
SUICIDE
1
2
RETURN
)

1
evmjit/evmcc/test/ext/extcodecopy1.evm

@ -1 +0,0 @@
60c86000600a303c60005360006020f2

11
evmjit/evmcc/test/ext/extcodecopy1.lll

@ -1,11 +0,0 @@
(asm
200 ;; byte count
0 ;; source index in code array
10 ;; dest index in memory
ADDRESS
EXTCODECOPY
0 MLOAD ;; to dump memory
0 32 RETURN
)

1
evmjit/evmcc/test/ext/store_delete.evm

@ -1 +0,0 @@
6104d26063576000606357

9
evmjit/evmcc/test/ext/store_delete.lll

@ -1,9 +0,0 @@
(asm
1234
99
SSTORE
0
99
SSTORE
)

1
evmjit/evmcc/test/ext/store_test.evm

@ -1 +0,0 @@
607b607c60015760005760015660005603

14
evmjit/evmcc/test/ext/store_test.lll

@ -1,14 +0,0 @@
(asm
123
124
1
SSTORE
0
SSTORE
1
SLOAD
0
SLOAD
SUB
)

7
evmjit/evmcc/test/jump/ackermann.ethel

@ -1,7 +0,0 @@
let A m n =
if m == 0 then n+1
else if n == 0 then A (m-1) 1
else A (m-1) (A (m) (n-1))
return A 3 8

1
evmjit/evmcc/test/jump/ackermann.evm

@ -1 +0,0 @@
6009600360086012585d60005460206000f26000820e6047596000810e603859603460018303603084600185036012585d6012585d60445860436001830360016012585d604b5860018101905090509058

1
evmjit/evmcc/test/jump/badindirect1.evm

@ -1 +0,0 @@
601b602502585d

9
evmjit/evmcc/test/jump/badindirect1.lll

@ -1,9 +0,0 @@
;; Indirect jump out of code
(asm
27
37
MUL
JUMP
JUMPDEST
)

1
evmjit/evmcc/test/jump/badindirect2.evm

@ -1 +0,0 @@
60016003600302596000600058

12
evmjit/evmcc/test/jump/badindirect2.lll

@ -1,12 +0,0 @@
;; Indirect jump into data
(asm
1 ;; 0
3
3
MUL ;; 6
JUMPI ;; 7
0 ;; 8
0
JUMP
)

1
evmjit/evmcc/test/jump/badjump1.evm

@ -1 +0,0 @@
6103e758

6
evmjit/evmcc/test/jump/badjump1.lll

@ -1,6 +0,0 @@
;; Direct jump out of code.
(asm
999
JUMP
)

1
evmjit/evmcc/test/jump/badjump2.evm

@ -1 +0,0 @@
6004586000600058

9
evmjit/evmcc/test/jump/badjump2.lll

@ -1,9 +0,0 @@
;; Direct jump into data
(asm
4 ;; 0 0-3
JUMP ;; 2
0 ;; 3 3-4
0 ;; 5 4-7
JUMP ;; 6
)

5
evmjit/evmcc/test/jump/call1.ethel

@ -1,5 +0,0 @@
let f n = n + 1
return f 2

1
evmjit/evmcc/test/jump/call1.evm

@ -1 +0,0 @@
600760026010585d60005460206000f28060010190509058

5
evmjit/evmcc/test/jump/call2.ethel

@ -1,5 +0,0 @@
let f a b = a + b
return f 2 3

1
evmjit/evmcc/test/jump/call2.evm

@ -1 +0,0 @@
6009600260036012585d60005460206000f2818101905090509058

5
evmjit/evmcc/test/jump/fac.ethel

@ -1,5 +0,0 @@
let fac n =
if n == 0 then 1
else n * fac (n-1)
return fac 60

1
evmjit/evmcc/test/jump/fac.evm

@ -1 +0,0 @@
6007603c6010585d60005460206000f26000810e6026596020600182036010585d8102602858600190509058

5
evmjit/evmcc/test/jump/fac_tail.ethel

@ -1,5 +0,0 @@
let fac a n =
if n == 0 then a
else fac (a*n) (n-1)
return fac 1 60

1
evmjit/evmcc/test/jump/fac_tail.evm

@ -1 +0,0 @@
60096001603c6012585d60005460206000f26000810e6029596025818302600183036012585d602a5881905090509058

6
evmjit/evmcc/test/jump/fib1.ethel

@ -1,6 +0,0 @@
let fib n =
if n < 3 then 1
else fib (n-1) + fib (n-2)
return fib 10

1
evmjit/evmcc/test/jump/fib1.evm

@ -1 +0,0 @@
6007600a6010585d60005460206000f26003810a602f596020600282036010585d602a600183036010585d01603158600190509058

1
evmjit/evmcc/test/jump/for1.evm

@ -1 +0,0 @@
600a60805460006080530b0f60255960a0536080530160a054600160805303608054600558

3
evmjit/evmcc/test/jump/for1.lll

@ -1,3 +0,0 @@
(for [i]:10 (> @i 0) [i](- @i 1)
[j](+ @i @j)
)

1
evmjit/evmcc/test/jump/for2.evm

@ -1 +0,0 @@
6000608054600a6080530a0f60255960a0536080530160a054600160805301608054600558

3
evmjit/evmcc/test/jump/for2.lll

@ -1,3 +0,0 @@
(for [i]:0 (< @i 10) [i](+ @i 1)
[j](+ @i @j)
)

1
evmjit/evmcc/test/jump/if1.ethel

@ -1 +0,0 @@
return if 0 then 1 else 2

1
evmjit/evmcc/test/jump/if1.evm

@ -1 +0,0 @@
60006300000010596002630000001258600160005460206000f2

1
evmjit/evmcc/test/jump/if2.ethel

@ -1 +0,0 @@
return if 1 then 1 else 2

1
evmjit/evmcc/test/jump/if2.evm

@ -1 +0,0 @@
60016300000010596002630000001258600160005460206000f2

1
evmjit/evmcc/test/jump/indirect1.evm

@ -1 +0,0 @@
600460030158005d6001600054

13
evmjit/evmcc/test/jump/indirect1.lll

@ -1,13 +0,0 @@
;; Indirect JUMP
(asm
4 ;; 0
3 ;; 2
ADD ;; 4
JUMP ;; 5
STOP ;; 6
JUMPDEST ;; 7
1
0
MSTORE
)

1
evmjit/evmcc/test/jump/indirect2.evm

@ -1 +0,0 @@
600860060158005d6001600054005d600260005400

19
evmjit/evmcc/test/jump/indirect2.lll

@ -1,19 +0,0 @@
;; Indirect JUMP
(asm
8 ;; 0
6 ;; 2
ADD ;; 4
JUMP ;; 5 --> 14
STOP ;; 6
JUMPDEST ;; 7
1 ;; 8
0 ;; 10
MSTORE ;; 12
STOP ;; 13
JUMPDEST ;; 14
2
0
MSTORE
STOP
)

1
evmjit/evmcc/test/jump/indirect3.evm

@ -1 +0,0 @@
6001600460050159005d6001600054

14
evmjit/evmcc/test/jump/indirect3.lll

@ -1,14 +0,0 @@
;; Indirect JUMP
(asm
1 ;; 0
4 ;; 2
5 ;; 4
ADD ;; 6
JUMPI ;; 7
STOP ;; 8
JUMPDEST ;; 9
1
0
MSTORE
)

1
evmjit/evmcc/test/jump/indirect4.evm

@ -1 +0,0 @@
60006007600501596001600054005d00

15
evmjit/evmcc/test/jump/indirect4.lll

@ -1,15 +0,0 @@
;; Indirect JUMP
(asm
0 ;; 0
7 ;; 2
5 ;; 4
ADD ;; 6
JUMPI ;; 7
1 ;; 8
0 ;; 9
MSTORE ;; 10
STOP ;; 11
JUMPDEST ;; 12
STOP
)

1
evmjit/evmcc/test/jump/jump1.evm

@ -1 +0,0 @@
600458006001600154

11
evmjit/evmcc/test/jump/jump1.lll

@ -1,11 +0,0 @@
;; Direct JUMP.
;; output: memory[1] == 1
(asm
4 ;; 0
JUMP ;; 2
STOP ;; 3
1 ;; 4
1 ;; 6
MSTORE ;; 8
)

1
evmjit/evmcc/test/jump/jump2.evm

@ -1 +0,0 @@
6008586001600154

10
evmjit/evmcc/test/jump/jump2.lll

@ -1,10 +0,0 @@
;; Direct JUMP to the end of code.
;; output: memory should have size 0.
(asm
8 ;; 0
JUMP ;; 2
1 ;; 3
1 ;; 5
MSTORE ;; 7
)

1
evmjit/evmcc/test/jump/jump3.evm

@ -1 +0,0 @@
602a586001600154

10
evmjit/evmcc/test/jump/jump3.lll

@ -1,10 +0,0 @@
;; Direct JUMP past the end of code.
;; output: memory should have size 0.
(asm
42
JUMP
1
1
MSTORE
)

1
evmjit/evmcc/test/jump/jump4.evm

@ -1 +0,0 @@
600b6009580000600558005d6001600154

17
evmjit/evmcc/test/jump/jump4.lll

@ -1,17 +0,0 @@
;; Direct JUMP.
;; output: memory[1] = 1
(asm
11 ;; 0
9 ;; 2
JUMP ;; 4 --> 9
STOP ;; 5
STOP ;; 6
5 ;; 7
JUMP ;; 9 --> 11
STOP ;; 10
JUMPDEST
1 ;; 11
1
MSTORE
)

1
evmjit/evmcc/test/jump/jump5.evm

@ -1 +0,0 @@
6005600e585d600160015400600f5800

16
evmjit/evmcc/test/jump/jump5.lll

@ -1,16 +0,0 @@
;; Direct JUMP.
;; output: memory[1] = 1
(asm
5 ;; 0
14 ;; 2
JUMP ;; 4 --> 14
JUMPDEST ;; 5
1 ;; 6
1 ;; 8
MSTORE ;; 10
STOP ;; 11
15 ;; 12
JUMP ;; 14 --> 5
STOP ;; 15
)

1
evmjit/evmcc/test/jump/jump6.evm

@ -1 +0,0 @@
600358600f600d58006014600758005d6001600154005d600260025400

32
evmjit/evmcc/test/jump/jump6.lll

@ -1,32 +0,0 @@
;; Direct JUMP.
;; output: memory[1] = 1
;; 0, 2 --> 3 .. 7 --> 13 -*-> 15 .. 19
(asm
3 ;; 0
JUMP ;; 2
15 ;; 3 <- start
13 ;; 5
JUMP ;; 7 <- b
STOP ;; 8
20 ;; 9
7 ;; 11
JUMP ;; 13 <- a
STOP ;; 14
JUMPDEST ;; 15 <- c
1 ;; 16
1 ;; 18
MSTORE ;; 19
STOP ;; 20
JUMPDEST ;; 21 <- d
2 ;; 22
2 ;; 24
MSTORE ;; 26
STOP ;; 27
)

1
evmjit/evmcc/test/jump/jumpi_at_the_end.evm

@ -1 +0,0 @@
600a6000545d6000536001900380600054600659

1
evmjit/evmcc/test/jump/jumpi_at_the_end.lll

@ -1 +0,0 @@
(asm 10 0 MSTORE JUMPDEST 0 MLOAD 1 SWAP1 SUB DUP1 0 MSTORE 6 JUMPI)

1
evmjit/evmcc/test/jump/loop1.evm

@ -1 +0,0 @@
600a600181038060025960005460015460025400

27
evmjit/evmcc/test/jump/loop1.lll

@ -1,27 +0,0 @@
;; Produces 1 2 3 4 5 6 7 8 9 10 on the stack and exits
(asm
10
;; 2
1
DUP2
SUB
DUP1
2
JUMPI
;; stack = 1 2 3 4 5 6 7 8 9 10
0
MSTORE
1
MSTORE
2
MSTORE
;;3
;;MSTORE
STOP
)

1
evmjit/evmcc/test/jump/loop2.evm

@ -1 +0,0 @@
600a80600190038060025960005460015460025400

28
evmjit/evmcc/test/jump/loop2.lll

@ -1,28 +0,0 @@
;; Produces 1 2 3 4 5 6 7 8 9 10 on the stack and exits
(asm
10
;; 2
DUP1
1
SWAP1
SUB
DUP1
2
JUMPI
;; stack = 1 2 3 4 5 6 7 8 9 10
0
MSTORE
1
MSTORE
2
MSTORE
;;3
;;MSTORE
STOP
)

4
evmjit/evmcc/test/jump/rec1.ethel

@ -1,4 +0,0 @@
let f n =
if n == 0 then 2 else f (n-1)
return f 10

1
evmjit/evmcc/test/jump/rec1.evm

@ -1 +0,0 @@
6007600a6010585d60005460206000f26000810e6024596020600182036010585d602658600290509058

10
evmjit/evmcc/test/jump/when1.asm

@ -1,10 +0,0 @@
.code:
PUSH 1
NOT
PUSH [tag0]
JUMPI
PUSH 13
PUSH 128
MSTORE
tag0:

1
evmjit/evmcc/test/jump/when1.evm

@ -1 +0,0 @@
60010f600b59600d608054

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save