diff --git a/include/evmjit/JIT.h b/include/evmjit/JIT.h index 446dd9e56..c9ddde705 100644 --- a/include/evmjit/JIT.h +++ b/include/evmjit/JIT.h @@ -28,8 +28,8 @@ public: private: friend class dev::eth::jit::ExecutionEngine; - static void* getCode(h256 _codeHash); - static void mapCode(h256 _codeHash, void* _funcAddr); + static uint64_t getCode(h256 _codeHash); + static void mapCode(h256 _codeHash, uint64_t _funcAddr); }; } diff --git a/libevmjit/ExecutionEngine.cpp b/libevmjit/ExecutionEngine.cpp index 08ca403b5..e5abb36b3 100644 --- a/libevmjit/ExecutionEngine.cpp +++ b/libevmjit/ExecutionEngine.cpp @@ -183,7 +183,7 @@ ReturnCode ExecutionEngine::run(RuntimeData* _data, Env* _env) entryFuncPtr = (EntryFuncPtr)ee->getFunctionAddress(mainFuncName); if (!CHECK(entryFuncPtr)) return ReturnCode::LLVMLinkError; - JIT::mapCode(_data->codeHash, (void*)entryFuncPtr); // FIXME: Remove cast + JIT::mapCode(_data->codeHash, (uint64_t)entryFuncPtr); // FIXME: Remove cast } listener->stateChanged(ExecState::Execution); diff --git a/libevmjit/JIT.cpp b/libevmjit/JIT.cpp index 9774c7396..8617fab6d 100644 --- a/libevmjit/JIT.cpp +++ b/libevmjit/JIT.cpp @@ -12,7 +12,7 @@ namespace class JITImpl: JIT { public: - std::unordered_map codeMap; + std::unordered_map codeMap; static JITImpl& instance() { @@ -28,16 +28,16 @@ bool JIT::isCodeReady(h256 _codeHash) return JITImpl::instance().codeMap.count(_codeHash) != 0; } -void* JIT::getCode(h256 _codeHash) +uint64_t JIT::getCode(h256 _codeHash) { auto& codeMap = JITImpl::instance().codeMap; auto it = codeMap.find(_codeHash); if (it != codeMap.end()) return it->second; - return nullptr; + return 0; } -void JIT::mapCode(h256 _codeHash, void* _funcAddr) +void JIT::mapCode(h256 _codeHash, uint64_t _funcAddr) { JITImpl::instance().codeMap.insert(std::make_pair(_codeHash, _funcAddr)); }