Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dev::eth::jit::Memory Class Reference

#include <Memory.h>

Inheritance diagram for dev::eth::jit::Memory:
[legend]
Collaboration diagram for dev::eth::jit::Memory:
[legend]

Public Member Functions

 Memory (RuntimeManager &_runtimeManager, GasMeter &_gasMeter)
 
llvm::Value * loadWord (llvm::Value *_addr)
 
void storeWord (llvm::Value *_addr, llvm::Value *_word)
 
void storeByte (llvm::Value *_addr, llvm::Value *_byte)
 
llvm::Value * getData ()
 
llvm::Value * getSize ()
 
llvm::Value * getBytePtr (llvm::Value *_index)
 
void copyBytes (llvm::Value *_srcPtr, llvm::Value *_srcSize, llvm::Value *_srcIndex, llvm::Value *_destMemIdx, llvm::Value *_byteCount)
 
void require (llvm::Value *_offset, llvm::Value *_size)
 Requires the amount of memory to for data defined by offset and size. And counts gas fee for that memory. More...
 

Private Member Functions

llvm::Function * createFunc (bool _isStore, llvm::Type *_type)
 
llvm::Function * getRequireFunc ()
 
llvm::Function * getLoadWordFunc ()
 
llvm::Function * getStoreWordFunc ()
 
llvm::Function * getStoreByteFunc ()
 

Private Attributes

Array m_memory
 
GasMeterm_gasMeter
 
llvm::Function * m_require = nullptr
 
llvm::Function * m_loadWord = nullptr
 
llvm::Function * m_storeWord = nullptr
 
llvm::Function * m_storeByte = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from dev::eth::jit::RuntimeHelper
 RuntimeHelper (RuntimeManager &_runtimeManager)
 
RuntimeManagergetRuntimeManager ()
 
- Protected Member Functions inherited from dev::eth::jit::CompilerHelper
 CompilerHelper (IRBuilder &_builder)
 
 CompilerHelper (const CompilerHelper &)=delete
 
CompilerHelperoperator= (CompilerHelper)=delete
 
llvm::Module * getModule ()
 Reference to the IR module being compiled. More...
 
llvm::Function * getMainFunction ()
 Reference to the main module function. More...
 
- Protected Attributes inherited from dev::eth::jit::CompilerHelper
IRBuilderm_builder
 Reference to parent compiler IR builder. More...
 

Detailed Description

Definition at line 13 of file Memory.h.

Constructor & Destructor Documentation

dev::eth::jit::Memory::Memory ( RuntimeManager _runtimeManager,
GasMeter _gasMeter 
)

Definition at line 19 of file Memory.cpp.

Here is the call graph for this function:

Member Function Documentation

void dev::eth::jit::Memory::copyBytes ( llvm::Value *  _srcPtr,
llvm::Value *  _srcSize,
llvm::Value *  _srcIndex,
llvm::Value *  _destMemIdx,
llvm::Value *  _byteCount 
)

Definition at line 209 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Function * dev::eth::jit::Memory::createFunc ( bool  _isStore,
llvm::Type *  _type 
)
private

Definition at line 96 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Value * dev::eth::jit::Memory::getBytePtr ( llvm::Value *  _index)

Definition at line 194 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Value * dev::eth::jit::Memory::getData ( )

Definition at line 181 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Function * dev::eth::jit::Memory::getLoadWordFunc ( )
private

Definition at line 137 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Function * dev::eth::jit::Memory::getRequireFunc ( )
private

Definition at line 25 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Value * dev::eth::jit::Memory::getSize ( )

Definition at line 189 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Function * dev::eth::jit::Memory::getStoreByteFunc ( )
private

Definition at line 153 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Function * dev::eth::jit::Memory::getStoreWordFunc ( )
private

Definition at line 145 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

llvm::Value * dev::eth::jit::Memory::loadWord ( llvm::Value *  _addr)

Definition at line 162 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::eth::jit::Memory::require ( llvm::Value *  _offset,
llvm::Value *  _size 
)

Requires the amount of memory to for data defined by offset and size. And counts gas fee for that memory.

Definition at line 199 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::eth::jit::Memory::storeByte ( llvm::Value *  _addr,
llvm::Value *  _byte 
)

Definition at line 174 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void dev::eth::jit::Memory::storeWord ( llvm::Value *  _addr,
llvm::Value *  _word 
)

Definition at line 168 of file Memory.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

GasMeter& dev::eth::jit::Memory::m_gasMeter
private

Definition at line 33 of file Memory.h.

llvm::Function* dev::eth::jit::Memory::m_loadWord = nullptr
private

Definition at line 43 of file Memory.h.

Array dev::eth::jit::Memory::m_memory
private

Definition at line 31 of file Memory.h.

llvm::Function* dev::eth::jit::Memory::m_require = nullptr
private

Definition at line 42 of file Memory.h.

llvm::Function* dev::eth::jit::Memory::m_storeByte = nullptr
private

Definition at line 45 of file Memory.h.

llvm::Function* dev::eth::jit::Memory::m_storeWord = nullptr
private

Definition at line 44 of file Memory.h.


The documentation for this class was generated from the following files: