Browse Source

removed references to Memory::dump()

cl-refactor
artur-zawlocki 10 years ago
parent
commit
cdcbb6be12
  1. 18
      libevmjit/Memory.cpp
  2. 2
      libevmjit/Memory.h

18
libevmjit/Memory.cpp

@ -147,24 +147,18 @@ llvm::Function* Memory::createFunc(bool _isStore, llvm::Type* _valueType, GasMet
llvm::Value* Memory::loadWord(llvm::Value* _addr)
{
auto value = m_builder.CreateCall(m_loadWord, _addr);
dump(0);
return value;
}
void Memory::storeWord(llvm::Value* _addr, llvm::Value* _word)
{
m_builder.CreateCall2(m_storeWord, _addr, _word);
dump(0);
}
void Memory::storeByte(llvm::Value* _addr, llvm::Value* _word)
{
auto byte = m_builder.CreateTrunc(_word, Type::Byte, "byte");
m_builder.CreateCall2(m_storeByte, _addr, byte);
dump(0);
}
llvm::Value* Memory::getData()
@ -205,18 +199,6 @@ void Memory::copyBytes(llvm::Value* _srcPtr, llvm::Value* _srcSize, llvm::Value*
m_builder.CreateMemCpy(destPtr, srcPtr, bytesToCopy, 0);
}
void Memory::dump(uint64_t _begin, uint64_t _end)
{
if (getenv("EVMCC_DEBUG_MEMORY") == nullptr)
return;
auto beginVal = llvm::ConstantInt::get(m_builder.getInt64Ty(), _begin);
auto endVal = llvm::ConstantInt::get(m_builder.getInt64Ty(), _end);
std::vector<llvm::Value*> args = {beginVal, endVal};
m_builder.CreateCall(m_memDump, llvm::ArrayRef<llvm::Value*>(args));
}
}
}
}

2
libevmjit/Memory.h

@ -27,8 +27,6 @@ public:
/// Requires the amount of memory to for data defined by offset and size. And counts gas fee for that memory.
void require(llvm::Value* _offset, llvm::Value* _size);
void dump(uint64_t _begin, uint64_t _end = 0);
private:
llvm::Function* createFunc(bool _isStore, llvm::Type* _type, GasMeter& _gasMeter);
llvm::Function* createRequireFunc(GasMeter& _gasMeter, RuntimeManager& _runtimeManager);

Loading…
Cancel
Save