java

package module
v0.0.0-...-e81efd5 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: MIT Imports: 10 Imported by: 0

README

tvm

Documentation

Index

Constants

View Source
const (
	Public     accessFlags = 0x0001
	Static                 = 0x0008
	Final                  = 0x0010
	Super                  = 0x0020
	Native                 = 0x0100
	Interface              = 0x0200
	Abstract               = 0x0400
	Synthetic              = 0x1000
	Annotation             = 0x2000
	Enum                   = 0x4000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	MinorVersion      uint16
	MajorVersion      uint16
	ConstantPoolItems []ConstantPoolItem
	AccessFlags       accessFlags
	// contains filtered or unexported fields
}

func ParseClass

func ParseClass(r io.Reader) (c Class, err error)

func (*Class) Name

func (c *Class) Name() string

type Code

type Code struct {
	Instructions      []byte
	ExceptionHandlers []ExceptionHandler
	// contains filtered or unexported fields
}

type ConstantPoolItem

type ConstantPoolItem interface {
	String() string
	// contains filtered or unexported methods
}

type ExceptionHandler

type ExceptionHandler struct {
	Start     uint16
	End       uint16
	Handler   uint16
	CatchType uint16
	Class     string
}

type Frame

type Frame struct {
	PreviousFrame *Frame
	Class         *Class
	Method        *Method
	PC            *ProgramCounter
	Variables     []javaValue
	Root          bool
	// contains filtered or unexported fields
}

func (*Frame) DebugOut

func (f *Frame) DebugOut()

type Method

type Method struct {
	Signiture    []string
	RawSigniture string

	Code Code
	// contains filtered or unexported fields
}

func (*Method) Class

func (m *Method) Class() *Class

func (*Method) Name

func (m *Method) Name() string

func (*Method) Native

func (m *Method) Native() bool

func (*Method) Sig

func (m *Method) Sig() []string

func (*Method) Static

func (m *Method) Static() bool

type OpCode

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

func (OpCode) Name

func (op OpCode) Name() string

func (OpCode) String

func (op OpCode) String() string

func (OpCode) Width

func (op OpCode) Width() int

type ProgramCounter

type ProgramCounter struct {
	RawByteCodes     []byte
	RawByteCodeIndex int
	OpCodeIndex      int
	OpCodes          []OpCode
}

func (*ProgramCounter) CurrentByteCodeIndex

func (pc *ProgramCounter) CurrentByteCodeIndex() int

func (*ProgramCounter) DebugOut

func (pc *ProgramCounter) DebugOut()

func (*ProgramCounter) OpCode

func (pc *ProgramCounter) OpCode() OpCode

type VM

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

func NewVM

func NewVM() (vm VM)

func (*VM) ActiveFrame

func (vm *VM) ActiveFrame() *Frame

func (*VM) ActiveMethod

func (vm *VM) ActiveMethod() *Method

func (*VM) AddDirectory

func (vm *VM) AddDirectory(dir string)

func (*VM) LoadClass

func (vm *VM) LoadClass(path string) error

func (*VM) LoadedClasses

func (vm *VM) LoadedClasses() []*Class

func (*VM) Run

func (vm *VM) Run()

func (*VM) Start

func (vm *VM) Start()

func (*VM) Step

func (vm *VM) Step()

type WideConstantPart2

type WideConstantPart2 struct {
}

func (WideConstantPart2) String

func (l WideConstantPart2) String() string

Directories

Path Synopsis
cmd
tvm

Jump to

Keyboard shortcuts

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