Browse Source

Cleanup unused code.

cl-refactor
Paweł Bylica 10 years ago
parent
commit
f183ac4fbb
  1. 2
      evmjit/include/evmjit/JIT.h
  2. 2
      evmjit/libevmjit/Array.cpp
  3. 1
      evmjit/libevmjit/Ext.h

2
evmjit/include/evmjit/JIT.h

@ -129,7 +129,7 @@ public:
bytes_ref getReturnData() const; bytes_ref getReturnData() const;
private: protected:
RuntimeData* m_data = nullptr; ///< Pointer to data. Expected by compiled contract. RuntimeData* m_data = nullptr; ///< Pointer to data. Expected by compiled contract.
Env* m_env = nullptr; ///< Pointer to environment proxy. Expected by compiled contract. Env* m_env = nullptr; ///< Pointer to environment proxy. Expected by compiled contract.
byte* m_memData = nullptr; byte* m_memData = nullptr;

2
evmjit/libevmjit/Array.cpp

@ -18,7 +18,6 @@ namespace jit
{ {
static const auto c_reallocStep = 1; static const auto c_reallocStep = 1;
static const auto c_reallocMultipier = 2;
llvm::Value* LazyFunction::call(llvm::IRBuilder<>& _builder, std::initializer_list<llvm::Value*> const& _args, llvm::Twine const& _name) llvm::Value* LazyFunction::call(llvm::IRBuilder<>& _builder, std::initializer_list<llvm::Value*> const& _args, llvm::Twine const& _name)
{ {
@ -57,7 +56,6 @@ llvm::Function* Array::createArrayPushFunc()
m_builder.SetInsertPoint(reallocBB); m_builder.SetInsertPoint(reallocBB);
auto newCap = m_builder.CreateNUWAdd(cap, m_builder.getInt64(c_reallocStep), "newCap"); 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 reallocSize = m_builder.CreateShl(newCap, 5, "reallocSize"); // size in bytes: newCap * 32
auto bytes = m_builder.CreateBitCast(data, Type::BytePtr, "bytes"); auto bytes = m_builder.CreateBitCast(data, Type::BytePtr, "bytes");
auto newBytes = m_reallocFunc.call(m_builder, {bytes, reallocSize}, "newBytes"); auto newBytes = m_reallocFunc.call(m_builder, {bytes, reallocSize}, "newBytes");

1
evmjit/libevmjit/Ext.h

@ -62,7 +62,6 @@ private:
Memory& m_memoryMan; Memory& m_memoryMan;
llvm::Value* m_size; llvm::Value* m_size;
llvm::Value* m_data = nullptr;
std::array<llvm::Function*, sizeOf<EnvFunc>::value> m_funcs; std::array<llvm::Function*, sizeOf<EnvFunc>::value> m_funcs;
std::array<llvm::Value*, 8> m_argAllocas; std::array<llvm::Value*, 8> m_argAllocas;

Loading…
Cancel
Save