From f183ac4fbbb57617243f6435fe5c1acb815207d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 21 May 2015 17:54:37 +0200 Subject: [PATCH] Cleanup unused code. --- evmjit/include/evmjit/JIT.h | 2 +- evmjit/libevmjit/Array.cpp | 2 -- evmjit/libevmjit/Ext.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/evmjit/include/evmjit/JIT.h b/evmjit/include/evmjit/JIT.h index adca983d9..85c74ba18 100644 --- a/evmjit/include/evmjit/JIT.h +++ b/evmjit/include/evmjit/JIT.h @@ -129,7 +129,7 @@ public: bytes_ref getReturnData() const; -private: +protected: RuntimeData* m_data = nullptr; ///< Pointer to data. Expected by compiled contract. Env* m_env = nullptr; ///< Pointer to environment proxy. Expected by compiled contract. byte* m_memData = nullptr; diff --git a/evmjit/libevmjit/Array.cpp b/evmjit/libevmjit/Array.cpp index a76776c69..e77ceefe4 100644 --- a/evmjit/libevmjit/Array.cpp +++ b/evmjit/libevmjit/Array.cpp @@ -18,7 +18,6 @@ namespace jit { static const auto c_reallocStep = 1; -static const auto c_reallocMultipier = 2; llvm::Value* LazyFunction::call(llvm::IRBuilder<>& _builder, std::initializer_list const& _args, llvm::Twine const& _name) { @@ -57,7 +56,6 @@ llvm::Function* Array::createArrayPushFunc() m_builder.SetInsertPoint(reallocBB); auto newCap = m_builder.CreateNUWAdd(cap, m_builder.getInt64(c_reallocStep), "newCap"); - //newCap = m_builder.CreateNUWMul(newCap, m_builder.getInt64(c_reallocMultipier)); auto reallocSize = m_builder.CreateShl(newCap, 5, "reallocSize"); // size in bytes: newCap * 32 auto bytes = m_builder.CreateBitCast(data, Type::BytePtr, "bytes"); auto newBytes = m_reallocFunc.call(m_builder, {bytes, reallocSize}, "newBytes"); diff --git a/evmjit/libevmjit/Ext.h b/evmjit/libevmjit/Ext.h index 760f77df5..2af074f4a 100644 --- a/evmjit/libevmjit/Ext.h +++ b/evmjit/libevmjit/Ext.h @@ -62,7 +62,6 @@ private: Memory& m_memoryMan; llvm::Value* m_size; - llvm::Value* m_data = nullptr; std::array::value> m_funcs; std::array m_argAllocas;