Documentation ¶
Index ¶
- func MemoryCall(stack *Stack) (uint64, bool)
- func MemoryCallDataCopy(stack *Stack) (uint64, bool)
- func MemoryCodeCopy(stack *Stack) (uint64, bool)
- func MemoryCreate(stack *Stack) (uint64, bool)
- func MemoryDelegateCall(stack *Stack) (uint64, bool)
- func MemoryExtCodeCopy(stack *Stack) (uint64, bool)
- func MemoryLog(stack *Stack) (uint64, bool)
- func MemoryMLoad(stack *Stack) (uint64, bool)
- func MemoryMStore(stack *Stack) (uint64, bool)
- func MemoryMStore8(stack *Stack) (uint64, bool)
- func MemoryReturn(stack *Stack) (uint64, bool)
- func MemoryReturnDataCopy(stack *Stack) (uint64, bool)
- func MemoryRevert(stack *Stack) (uint64, bool)
- func MemorySha3(stack *Stack) (uint64, bool)
- func MemoryStaticCall(stack *Stack) (uint64, bool)
- func ReturnRStack(rs *ReturnStack)
- func Returnstack(s *Stack)
- type Memory
- func (m *Memory) Data() []byte
- func (m *Memory) Get(offset, size int64) (cpy []byte)
- func (m *Memory) GetPtr(offset, size int64) []byte
- func (m *Memory) Len() int
- func (m *Memory) Print()
- func (m *Memory) Resize(size uint64)
- func (m *Memory) Set(offset, size uint64, value []byte) (err error)
- func (m *Memory) Set32(offset uint64, val *uint256.Int) (err error)
- type MemorySizeFunc
- type ReturnStack
- type Stack
- func (st *Stack) Back(n int) *uint256.Int
- func (st *Stack) Data() []uint256.Int
- func (st *Stack) Dup(n int)
- func (st *Stack) Len() int
- func (st *Stack) Peek() *uint256.Int
- func (st *Stack) Pop() (ret uint256.Int)
- func (st *Stack) Print()
- func (st *Stack) Push(d *uint256.Int)
- func (st *Stack) PushN(ds ...uint256.Int)
- func (st *Stack) Require(n int) error
- func (st *Stack) Swap(n int)
- type StackValidationFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemoryCallDataCopy ¶
MemoryCallDataCopy callDataCopy所需内存大小
func MemoryCodeCopy ¶
MemoryCodeCopy codeCopy所需内存大小
func MemoryDelegateCall ¶
MemoryDelegateCall delegateCall所需内存大小
func MemoryExtCodeCopy ¶
MemoryExtCodeCopy extCodeCopy所需内存大小
func MemoryReturnDataCopy ¶
MemoryReturnDataCopy returnDataCopy所需内存大小
func MemoryStaticCall ¶
MemoryStaticCall staticCall所需内存大小
func ReturnRStack ¶ added in v1.65.1
func ReturnRStack(rs *ReturnStack)
ReturnRStack 将returnStack还给rStackPool
Types ¶
type Memory ¶
type Memory struct { // Store 内存中存储的数据 Store []byte // LastGasCost 上次开辟内存消耗的Gas LastGasCost uint64 }
Memory 内存操作封装,在EVM中使用此对象模拟物理内存
type MemorySizeFunc ¶
MemorySizeFunc 计算所需内存大小
type ReturnStack ¶ added in v1.65.1
type ReturnStack struct {
// contains filtered or unexported fields
}
ReturnStack 返回栈对象
func NewReturnStack ¶ added in v1.65.1
func NewReturnStack() *ReturnStack
NewReturnStack 返回栈对象封装,提供常用的返回栈操作
func (*ReturnStack) Pop ¶ added in v1.65.1
func (st *ReturnStack) Pop() (ret uint32)
Pop A uint32 is sufficient as for code below 4.2G
type StackValidationFunc ¶
StackValidationFunc 校验栈中数据是否满足计算要求
func MakeDupStackFunc ¶
func MakeDupStackFunc(n int) StackValidationFunc
MakeDupStackFunc 创建栈大小计算方法对象
func MakeStackFunc ¶
func MakeStackFunc(pop, push int) StackValidationFunc
MakeStackFunc 栈校验的通用逻辑封装(主要就是检查栈的深度和空间是否够用)
func MakeSwapStackFunc ¶
func MakeSwapStackFunc(n int) StackValidationFunc
MakeSwapStackFunc 创建栈大小计算方法对象
Click to show internal directories.
Click to hide internal directories.