From 2b31cba5d2b9b9b3fa2f349599cf1c5661072048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 31 Dec 2014 14:56:43 +0100 Subject: [PATCH] Memory manager cleanup --- libevmjit/Memory.cpp | 8 +------- libevmjit/Memory.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/libevmjit/Memory.cpp b/libevmjit/Memory.cpp index 95e38d4a8..c60a5e554 100644 --- a/libevmjit/Memory.cpp +++ b/libevmjit/Memory.cpp @@ -27,14 +27,8 @@ Memory::Memory(RuntimeManager& _runtimeManager, GasMeter& _gasMeter): RuntimeHelper(_runtimeManager), // TODO: RuntimeHelper not needed m_gasMeter(_gasMeter) { - auto module = getModule(); - llvm::Type* argTypes[] = {Type::Word, Type::Word}; - auto dumpTy = llvm::FunctionType::get(m_builder.getVoidTy(), llvm::ArrayRef(argTypes), false); - m_memDump = llvm::Function::Create(dumpTy, llvm::GlobalValue::LinkageTypes::ExternalLinkage, - "evmccrt_memory_dump", module); - llvm::Type* resizeArgs[] = {Type::RuntimePtr, Type::WordPtr}; - m_resize = llvm::Function::Create(llvm::FunctionType::get(Type::BytePtr, resizeArgs, false), llvm::Function::ExternalLinkage, "mem_resize", module); + m_resize = llvm::Function::Create(llvm::FunctionType::get(Type::BytePtr, resizeArgs, false), llvm::Function::ExternalLinkage, "mem_resize", getModule()); llvm::AttrBuilder attrBuilder; attrBuilder.addAttribute(llvm::Attribute::NoAlias).addAttribute(llvm::Attribute::NoCapture).addAttribute(llvm::Attribute::NonNull).addAttribute(llvm::Attribute::ReadOnly); m_resize->setAttributes(llvm::AttributeSet::get(m_resize->getContext(), 1, attrBuilder)); diff --git a/libevmjit/Memory.h b/libevmjit/Memory.h index c99f1583f..ed9c51805 100644 --- a/libevmjit/Memory.h +++ b/libevmjit/Memory.h @@ -38,8 +38,6 @@ private: llvm::Function* m_loadWord; llvm::Function* m_storeWord; llvm::Function* m_storeByte; - - llvm::Function* m_memDump; }; }