Browse Source

Merge branch 'develop-evmcc' of https://github.com/imapp-pl/ethereum into develop-evmcc

cl-refactor
Paweł Bylica 10 years ago
parent
commit
af8696e8c8
  1. 1
      CMakeLists.txt
  2. 1
      evmcc/CMakeLists.txt
  3. 4
      libevm/VM.cpp
  4. 11
      libevmjit/Compiler.cpp
  5. 4
      test/CMakeLists.txt

1
CMakeLists.txt

@ -157,6 +157,7 @@ if (NOT LANGUAGES)
endif()
if (EVMCC)
add_subdirectory(libevmjit)
add_subdirectory(evmcc)
endif()

1
evmcc/CMakeLists.txt

@ -12,6 +12,7 @@ target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} ethcore)
target_link_libraries(${EXECUTABLE} evm)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} evmjit)
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")

4
libevm/VM.cpp

@ -25,6 +25,10 @@ using namespace std;
using namespace dev;
using namespace dev::eth;
uint32_t const dev::eth::FeeStructure::c_memoryGas;
uint32_t const dev::eth::FeeStructure::c_txDataGas;
uint32_t const dev::eth::FeeStructure::c_txGas;
void VM::reset(u256 _gas)
{
m_gas = _gas;

11
libevmjit/Compiler.cpp

@ -939,7 +939,6 @@ void Compiler::dumpBasicBlockGraph(std::ostream& out)
<< " node [shape=record];\n"
<< " entry [share=record, label=\"entry block\"];\n";
// std::map<std::string, BasicBlock*> blocksByName;
std::vector<BasicBlock*> blocks;
for (auto& pair : this->basicBlocks)
{
@ -952,7 +951,6 @@ void Compiler::dumpBasicBlockGraph(std::ostream& out)
for (auto bb : blocks)
{
std::string blockName = bb->llvm()->getName();
// blocksByName.insert(std::pair<std::string, BasicBlock*>(blockName, bb));
int numOfPhiNodes = 0;
auto firstNonPhiPtr = bb->llvm()->getFirstNonPHI();
@ -961,10 +959,8 @@ void Compiler::dumpBasicBlockGraph(std::ostream& out)
auto endStackSize = bb->getStack().size();
out << " \"" << blockName << "\" [shape=record, label=\""
<< std::to_string(numOfPhiNodes) << "|"
<< blockName << "|"
<< std::to_string(endStackSize)
<< "\"];\n";
<< numOfPhiNodes << "|" << blockName << "|" << endStackSize
<< "\"];\n";
}
out << " entry -> \"Instr.0\";\n";
@ -978,7 +974,8 @@ void Compiler::dumpBasicBlockGraph(std::ostream& out)
for (llvm::succ_iterator it = llvm::succ_begin(bb->llvm()); it != end; ++it)
{
std::string succName = it->getName();
out << " \"" << blockName << "\" -> \"" << succName << "\";\n";
out << " \"" << blockName << "\" -> \"" << succName << "\""
<< ((bb == m_jumpTableBlock.get()) ? " [style = dashed];\n" : "\n");
}
}

4
test/CMakeLists.txt

@ -5,6 +5,8 @@ aux_source_directory(. SRC_LIST)
include_directories(..)
link_directories(../libethcore)
link_directories(../libethereum)
link_directories(../libevm)
link_directories(../libevmjit)
file(GLOB HEADERS "*.h")
add_executable(testeth ${SRC_LIST} ${HEADERS})
@ -14,6 +16,8 @@ target_link_libraries(testeth ethcore)
target_link_libraries(testeth secp256k1)
target_link_libraries(testeth gmp)
target_link_libraries(testeth ${CRYPTOPP_LS})
target_link_libraries(testeth evm)
target_link_libraries(testeth evmjit)
if ("${TARGET_PLATFORM}" STREQUAL "w64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")

Loading…
Cancel
Save