From 695751672c675d4ed61451cb4ef1e33916c9bb04 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 15 Jan 2015 14:58:00 -0500 Subject: [PATCH] More consistency! --- libevmjit/Compiler.cpp | 4 ++-- libevmjit/Ext.cpp | 6 +++--- libevmjit/Ext.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libevmjit/Compiler.cpp b/libevmjit/Compiler.cpp index bfcb9cea1..26c78b4ca 100644 --- a/libevmjit/Compiler.cpp +++ b/libevmjit/Compiler.cpp @@ -644,7 +644,7 @@ void Compiler::compileBasicBlock(BasicBlock& _basicBlock, bytes const& _bytecode case Instruction::EXTCODESIZE: { auto addr = stack.pop(); - auto codeRef = _ext.getExtCode(addr); + auto codeRef = _ext.extcode(addr); stack.push(codeRef.size); break; } @@ -682,7 +682,7 @@ void Compiler::compileBasicBlock(BasicBlock& _basicBlock, bytes const& _bytecode auto srcIdx = stack.pop(); auto reqBytes = stack.pop(); - auto codeRef = _ext.getExtCode(addr); + auto codeRef = _ext.extcode(addr); _memory.copyBytes(codeRef.ptr, codeRef.size, srcIdx, destMemIdx, reqBytes); break; diff --git a/libevmjit/Ext.cpp b/libevmjit/Ext.cpp index 7ab6a5504..aae68f43a 100644 --- a/libevmjit/Ext.cpp +++ b/libevmjit/Ext.cpp @@ -51,7 +51,7 @@ std::array::value> const& getEnvFuncDescs() FuncDesc{"env_call", getFunctionType(Type::Bool, {Type::EnvPtr, Type::WordPtr, Type::WordPtr, Type::WordPtr, Type::BytePtr, Type::Size, Type::BytePtr, Type::Size, Type::WordPtr})}, FuncDesc{"env_log", getFunctionType(Type::Void, {Type::EnvPtr, Type::BytePtr, Type::Size, Type::WordPtr, Type::WordPtr, Type::WordPtr, Type::WordPtr})}, FuncDesc{"env_blockhash", getFunctionType(Type::Void, {Type::EnvPtr, Type::WordPtr, Type::WordPtr})}, - FuncDesc{"env_getExtCode", getFunctionType(Type::BytePtr, {Type::EnvPtr, Type::WordPtr, Type::Size->getPointerTo()})}, + FuncDesc{"env_extcode", getFunctionType(Type::BytePtr, {Type::EnvPtr, Type::WordPtr, Type::Size->getPointerTo()})}, FuncDesc{"ext_calldataload", getFunctionType(Type::Void, {Type::RuntimeDataPtr, Type::WordPtr, Type::WordPtr})}, }}; @@ -169,10 +169,10 @@ llvm::Value* Ext::sha3(llvm::Value* _inOff, llvm::Value* _inSize) return hash; } -MemoryRef Ext::getExtCode(llvm::Value* _addr) +MemoryRef Ext::extcode(llvm::Value* _addr) { auto addr = Endianness::toBE(m_builder, _addr); - auto code = createCall(EnvFunc::getExtCode, {getRuntimeManager().getEnvPtr(), byPtr(addr), m_size}); + auto code = createCall(EnvFunc::extcode, {getRuntimeManager().getEnvPtr(), byPtr(addr), m_size}); auto codeSize = m_builder.CreateLoad(m_size); auto codeSize256 = m_builder.CreateZExt(codeSize, Type::Word); return {code, codeSize256}; diff --git a/libevmjit/Ext.h b/libevmjit/Ext.h index 86a8a6190..2601d32ab 100644 --- a/libevmjit/Ext.h +++ b/libevmjit/Ext.h @@ -34,7 +34,7 @@ enum class EnvFunc call, log, blockhash, - getExtCode, + extcode, calldataload, // Helper function, not client Env interface _size @@ -55,7 +55,7 @@ public: llvm::Value* blockhash(llvm::Value* _number); llvm::Value* sha3(llvm::Value* _inOff, llvm::Value* _inSize); - MemoryRef getExtCode(llvm::Value* _addr); + MemoryRef extcode(llvm::Value* _addr); void log(llvm::Value* _memIdx, llvm::Value* _numBytes, std::array const& _topics);