vm

package
v0.0.0-...-21f6697 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GlobalsSize = 65536
View Source
const MaxFrames = 1024
View Source
const StackSize = 2048

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

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

func NewFrame

func NewFrame(cl *object.Closure, basePointer uint) *Frame

func (*Frame) Instructions

func (f *Frame) Instructions() code.Instructions

type VM

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

func New

func New(bytecode *compile.Bytecode) *VM

func NewWithGlobalsStore

func NewWithGlobalsStore(bytecode *compile.Bytecode, globals []object.Object) *VM

func (*VM) LastPoppedStackElem

func (vm *VM) LastPoppedStackElem() object.Object

func (*VM) Run

func (vm *VM) Run() error

Run fetches, decodes and executes the bytecode instructions

func (*VM) StackTop

func (vm *VM) StackTop() object.Object

Jump to

Keyboard shortcuts

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