Documentation ¶
Index ¶
- func BranchJump(frame *rtda.Frame, offset int)
- func InitClass(thread *rtda.Thread, class *heap.ClassObject)
- type BranchInstruction
- type ByteCodeReader
- func (this *ByteCodeReader) PC() int
- func (this *ByteCodeReader) ReadInt16() int16
- func (this *ByteCodeReader) ReadInt32() int32
- func (this *ByteCodeReader) ReadUint16() uint16
- func (this *ByteCodeReader) ReadUint8() uint8
- func (this *ByteCodeReader) Reset(code []byte, pc int)
- func (this *ByteCodeReader) SkipPadding()
- type Index16Instruction
- type Index8Instruction
- type Instruction
- type NoOperandsInstruction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchJump ¶
Types ¶
type BranchInstruction ¶
type BranchInstruction struct {
Offset int
}
func (*BranchInstruction) FetchOperands ¶
func (this *BranchInstruction) FetchOperands(reader *ByteCodeReader)
type ByteCodeReader ¶
type ByteCodeReader struct {
// contains filtered or unexported fields
}
func (*ByteCodeReader) PC ¶
func (this *ByteCodeReader) PC() int
func (*ByteCodeReader) ReadInt16 ¶
func (this *ByteCodeReader) ReadInt16() int16
func (*ByteCodeReader) ReadInt32 ¶
func (this *ByteCodeReader) ReadInt32() int32
字节码字节流大段法存储,先读到的数据在高位
func (*ByteCodeReader) ReadUint16 ¶
func (this *ByteCodeReader) ReadUint16() uint16
字节码字节流大段法存储,先读到的数据在高位
func (*ByteCodeReader) Reset ¶
func (this *ByteCodeReader) Reset(code []byte, pc int)
func (*ByteCodeReader) SkipPadding ¶
func (this *ByteCodeReader) SkipPadding()
type Index16Instruction ¶
type Index16Instruction struct {
Index uint
}
操作数是两个字节的下标,通常是运行时常量表的下标
func (*Index16Instruction) FetchOperands ¶
func (this *Index16Instruction) FetchOperands(reader *ByteCodeReader)
type Index8Instruction ¶
type Index8Instruction struct {
Index uint
}
操作数是单字节下标,通常是从本地变量表的下标
func (*Index8Instruction) FetchOperands ¶
func (this *Index8Instruction) FetchOperands(reader *ByteCodeReader)
type Instruction ¶
type Instruction interface { // 从 reader 里读取操作数,不同的指令操作数个数、类型不同 FetchOperands(reader *ByteCodeReader) // 执行指令 Execute(frame *rtda.Frame) }
type NoOperandsInstruction ¶
type NoOperandsInstruction struct { }
无操作数的指令
func (*NoOperandsInstruction) FetchOperands ¶
func (this *NoOperandsInstruction) FetchOperands(reader *ByteCodeReader)
Click to show internal directories.
Click to hide internal directories.