mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Remove Env* param from env_sha3 function (not needed)
This commit is contained in:
parent
4fc4e76fa5
commit
116ce60b1c
2 changed files with 3 additions and 3 deletions
|
|
@ -108,7 +108,7 @@ extern "C"
|
|||
o_ret->a = ret ? 1 : 0;
|
||||
}
|
||||
|
||||
EXPORT void ext_sha3(ExtVMFace* _env, byte* _begin, uint64_t _size, h256* o_hash)
|
||||
EXPORT void ext_sha3(byte* _begin, uint64_t _size, h256* o_hash)
|
||||
{
|
||||
auto hash = sha3({_begin, _size});
|
||||
*o_hash = hash;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Ext::Ext(RuntimeManager& _runtimeManager, Memory& _memoryMan):
|
|||
m_log3 = llvm::Function::Create(llvm::FunctionType::get(Type::Void, {argsTypes, 6}, false), Linkage::ExternalLinkage, "ext_log3", module);
|
||||
m_log4 = llvm::Function::Create(llvm::FunctionType::get(Type::Void, {argsTypes, 7}, false), Linkage::ExternalLinkage, "ext_log4", module);
|
||||
|
||||
llvm::Type* sha3ArgsTypes[] = { Type::EnvPtr, Type::BytePtr, Type::Size, Type::WordPtr };
|
||||
llvm::Type* sha3ArgsTypes[] = {Type::BytePtr, Type::Size, Type::WordPtr};
|
||||
m_sha3 = llvm::Function::Create(llvm::FunctionType::get(Type::Void, sha3ArgsTypes, false), Linkage::ExternalLinkage, "ext_sha3", module);
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ llvm::Value* Ext::sha3(llvm::Value* _inOff, llvm::Value* _inSize)
|
|||
{
|
||||
auto begin = m_memoryMan.getBytePtr(_inOff);
|
||||
auto size = m_builder.CreateTrunc(_inSize, Type::Size, "size");
|
||||
createCall(m_sha3, getRuntimeManager().getEnv(), begin, size, m_args[1]);
|
||||
createCall(m_sha3, begin, size, m_args[1]);
|
||||
llvm::Value* hash = m_builder.CreateLoad(m_args[1]);
|
||||
hash = Endianness::toNative(m_builder, hash);
|
||||
return hash;
|
||||
|
|
|
|||
Loading…
Reference in a new issue