vm

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

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const StackSize = 2048

StackSize is the maximum size the stack can take

Variables

View Source
var False = &object.Boolean{Value: false}

False - an invariant false object

View Source
var True = &object.Boolean{Value: true}

True - an invariant true object

Functions

This section is empty.

Types

type VM

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

VM represents the virtual machine

func New

func New() *VM

New returns a new VM

func (*VM) LastPopped

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

LastPopped returns the item just popped from the stack

func (*VM) Run

func (vm *VM) Run(bc *compiler.Bytecode) error

Run executes the code that is given to it via the VM

Jump to

Keyboard shortcuts

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