stack

package
v0.0.0-...-92d349b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReturnNormalStack

func ReturnNormalStack(s *Stack)

func ReturnRStack

func ReturnRStack(rs *ReturnStack)

Types

type ReturnStack

type ReturnStack struct {
	// contains filtered or unexported fields
}

ReturnStack is an object for basic return stack operations.

func NewReturnStack

func NewReturnStack() *ReturnStack

func (*ReturnStack) Data

func (st *ReturnStack) Data() []uint32

func (*ReturnStack) Pop

func (st *ReturnStack) Pop() (ret uint32)

A uint32 is sufficient as for code below 4.2G

func (*ReturnStack) Push

func (st *ReturnStack) Push(d uint32)

type Stack

type Stack struct {
	Data []uint256.Int
}

Stack is an object for basic stack operations. Items popped to the stack are expected to be changed and modified. stack does not take care of adding newly initialised objects.

func New

func New() *Stack

func (*Stack) Back

func (st *Stack) Back(n int) *uint256.Int

Back returns the n'th item in stack

func (*Stack) Cap

func (st *Stack) Cap() int

func (*Stack) Dup

func (st *Stack) Dup(n int)

func (*Stack) Len

func (st *Stack) Len() int

func (*Stack) Peek

func (st *Stack) Peek() *uint256.Int

func (*Stack) Pop

func (st *Stack) Pop() (ret uint256.Int)

func (*Stack) Print

func (st *Stack) Print()

Print dumps the content of the stack

func (*Stack) Push

func (st *Stack) Push(d *uint256.Int)

func (*Stack) PushN

func (st *Stack) PushN(ds ...uint256.Int)

func (*Stack) Reset

func (st *Stack) Reset()

func (*Stack) Swap

func (st *Stack) Swap(n int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL