base_instructions

package
v0.0.0-...-d1d7e88 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 2 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeClass

func InitializeClass(thread *runtime_data_area.Thread, class *heap.Class)

func InvokeMethod

func InvokeMethod(frame *runtime_data_area.Frame, method *heap.Method)

func JumpToBranch

func JumpToBranch(frame *runtime_data_area.Frame, offset int)

Types

type BranchInstruction

type BranchInstruction struct {
	Offset int
}

func (*BranchInstruction) FetchOperands

func (branchInstruction *BranchInstruction) FetchOperands(bytecodeReader *BytecodeReader)

type BytecodeReader

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

func (*BytecodeReader) GetPC

func (bytecodeReader *BytecodeReader) GetPC() int

func (*BytecodeReader) ReadInt16

func (bytecodeReader *BytecodeReader) ReadInt16() int16

func (*BytecodeReader) ReadInt32

func (bytecodeReader *BytecodeReader) ReadInt32() int32

func (*BytecodeReader) ReadInt32Table

func (bytecodeReader *BytecodeReader) ReadInt32Table(count int32) []int32

func (*BytecodeReader) ReadInt8

func (bytecodeReader *BytecodeReader) ReadInt8() int8

func (*BytecodeReader) ReadUint16

func (bytecodeReader *BytecodeReader) ReadUint16() uint16

func (*BytecodeReader) ReadUint8

func (bytecodeReader *BytecodeReader) ReadUint8() uint8

func (*BytecodeReader) Reset

func (bytecodeReader *BytecodeReader) Reset(code []byte, pc int)

func (*BytecodeReader) SkipPadding

func (bytecodeReader *BytecodeReader) SkipPadding()

type Index16Instruction

type Index16Instruction struct {
	Index uint
}

func (*Index16Instruction) FetchOperands

func (index16Instruction *Index16Instruction) FetchOperands(bytecodeReader *BytecodeReader)

type Index8Instruction

type Index8Instruction struct {
	Index uint
}

func (*Index8Instruction) FetchOperands

func (index8Instruction *Index8Instruction) FetchOperands(bytecodeReader *BytecodeReader)

type Instruction

type Instruction interface {
	FetchOperands(bytecodeReader *BytecodeReader)
	Execute(frame *runtime_data_area.Frame)
}

type NoOperandsInstruction

type NoOperandsInstruction struct {
}

func (*NoOperandsInstruction) FetchOperands

func (noOperandsInstruction *NoOperandsInstruction) FetchOperands(bytecodeReader *BytecodeReader)

Jump to

Keyboard shortcuts

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