frame

package
v0.0.0-...-6a6eb0f Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

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

Frame represents a single stack frame. It has a reference to the main stack where the actual data resides. Frame is just a convenient wrapper to remember when the Frame started

func New

func New(s stack.Stack) *Frame

New creates a new Frame instance.

func (*Frame) DeclareVar

func (f *Frame) DeclareVar(v interface{}) int

DeclareVar puts a new variable in the stack, and returns the index where it now resides

func (*Frame) GetLvar

func (f *Frame) GetLvar(i int) (interface{}, error)

GetLvar gets the frame local variable at position i

func (*Frame) LastLvarIndex

func (f *Frame) LastLvarIndex() int

LastLvarIndex returns the index of the last element in our stack.

func (*Frame) Mark

func (f *Frame) Mark() int

Mark returns the current mark index

func (*Frame) SetLvar

func (f *Frame) SetLvar(i int, v interface{})

SetLvar sets the frame local variable at position i

func (*Frame) SetMark

func (f *Frame) SetMark(v int)

SetMark sets the offset from which this frame's variables may be stored

func (Frame) Stack

func (f Frame) Stack() stack.Stack

Jump to

Keyboard shortcuts

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