Documentation ¶
Index ¶
- Variables
- func MemoryCall(stack *Stack) *big.Int
- func MemoryCallDataCopy(stack *Stack) *big.Int
- func MemoryCodeCopy(stack *Stack) *big.Int
- func MemoryCreate(stack *Stack) *big.Int
- func MemoryDelegateCall(stack *Stack) *big.Int
- func MemoryExtCodeCopy(stack *Stack) *big.Int
- func MemoryLog(stack *Stack) *big.Int
- func MemoryMLoad(stack *Stack) *big.Int
- func MemoryMStore(stack *Stack) *big.Int
- func MemoryMStore8(stack *Stack) *big.Int
- func MemoryReturn(stack *Stack) *big.Int
- func MemoryReturnDataCopy(stack *Stack) *big.Int
- func MemoryRevert(stack *Stack) *big.Int
- func MemorySha3(stack *Stack) *big.Int
- func MemoryStaticCall(stack *Stack) *big.Int
- type IntPool
- type IntPoolPool
- 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 *big.Int) (err error)
- type MemorySizeFunc
- type Stack
- func (st *Stack) Back(n int) *big.Int
- func (st *Stack) Data() []*big.Int
- func (st *Stack) Dup(pool *IntPool, n int)
- func (st *Stack) Len() int
- func (st *Stack) Peek() *big.Int
- func (st *Stack) Pop() (ret *big.Int)
- func (st *Stack) Print()
- func (st *Stack) Push(d *big.Int)
- func (st *Stack) PushN(ds ...*big.Int)
- func (st *Stack) Require(n int) error
- func (st *Stack) Swap(n int)
- type StackValidationFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var PoolOfIntPools = &IntPoolPool{ pools: make([]*IntPool, 0, poolDefaultCap), }
PoolOfIntPools 内存缓冲池
Functions ¶
func MemoryCallDataCopy ¶
MemoryCallDataCopy callDataCopy所需内存大小
func MemoryDelegateCall ¶
MemoryDelegateCall delegateCall所需内存大小
func MemoryExtCodeCopy ¶
MemoryExtCodeCopy extCodeCopy所需内存大小
func MemoryReturnDataCopy ¶
MemoryReturnDataCopy returnDataCopy所需内存大小
func MemoryStaticCall ¶
MemoryStaticCall staticCall所需内存大小
Types ¶
type IntPool ¶
type IntPool struct {
// contains filtered or unexported fields
}
IntPool big.Int组成的内存池
type IntPoolPool ¶
type IntPoolPool struct {
// contains filtered or unexported fields
}
IntPoolPool 用于管理IntPool的Pool
type Memory ¶
type Memory struct { // Store 内存中存储的数据 Store []byte // LastGasCost 上次开辟内存消耗的Gas LastGasCost uint64 }
Memory 内存操作封装,在EVM中使用此对象模拟物理内存
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.