Documentation ¶
Index ¶
- type Frame
- type LocalVars
- func (self LocalVars) GetDouble(index uint) float64
- func (self LocalVars) GetFloat(index uint) float32
- func (self LocalVars) GetInt(index uint) int32
- func (self LocalVars) GetLong(index uint) int64
- func (self LocalVars) GetRef(index uint) *heap.Object
- func (self LocalVars) GetSlot(index uint) heap.Slot
- func (self LocalVars) GetThis() *heap.Object
- func (self LocalVars) SetDouble(index uint, val float64)
- func (self LocalVars) SetFloat(index uint, val float32)
- func (self LocalVars) SetInt(index uint, val int32)
- func (self LocalVars) SetLong(index uint, val int64)
- func (self LocalVars) SetRef(index uint, ref *heap.Object)
- func (self LocalVars) SetSlot(index uint, slot heap.Slot)
- type OperandStack
- func (self *OperandStack) Clear()
- func (self *OperandStack) GetRefFromTop(n uint) *heap.Object
- func (self *OperandStack) PopBoolean() bool
- func (self *OperandStack) PopDouble() float64
- func (self *OperandStack) PopFloat() float32
- func (self *OperandStack) PopInt() int32
- func (self *OperandStack) PopLong() int64
- func (self *OperandStack) PopRef() *heap.Object
- func (self *OperandStack) PopSlot() heap.Slot
- func (self *OperandStack) PushBoolean(val bool)
- func (self *OperandStack) PushDouble(val float64)
- func (self *OperandStack) PushFloat(val float32)
- func (self *OperandStack) PushInt(val int32)
- func (self *OperandStack) PushLong(val int64)
- func (self *OperandStack) PushRef(ref *heap.Object)
- func (self *OperandStack) PushSlot(slot heap.Slot)
- type Stack
- type Thread
- func (self *Thread) ClearStack()
- func (self *Thread) CurrentFrame() *Frame
- func (self *Thread) GetFrames() []*Frame
- func (self *Thread) IsStackEmpty() bool
- func (self *Thread) NewFrame(method *heap.Method) *Frame
- func (self *Thread) PC() int
- func (self *Thread) PopFrame() *Frame
- func (self *Thread) PushFrame(frame *Frame)
- func (self *Thread) SetPC(pc int)
- func (self *Thread) TopFrame() *Frame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
*
栈帧
func (*Frame) OperandStack ¶
func (self *Frame) OperandStack() *OperandStack
type LocalVars ¶
*
局部变量表,按照索引访问 存放基本类型或者引用类型 注意:我们并没有针对boolean、byte、short和char类型定义存取方法,这些类型都可以转换成int值类处理
type OperandStack ¶
type OperandStack struct {
// contains filtered or unexported fields
}
这也是一个栈结构,操作数栈
func (*OperandStack) Clear ¶
func (self *OperandStack) Clear()
func (*OperandStack) GetRefFromTop ¶
func (self *OperandStack) GetRefFromTop(n uint) *heap.Object
*
返回距离操作数栈顶n个单元格的引用变量。 n = 0 返回操作数占顶引用 n = 1 返回制定开始的第二个引用
func (*OperandStack) PopBoolean ¶
func (self *OperandStack) PopBoolean() bool
func (*OperandStack) PopDouble ¶
func (self *OperandStack) PopDouble() float64
func (*OperandStack) PopFloat ¶
func (self *OperandStack) PopFloat() float32
func (*OperandStack) PopInt ¶
func (self *OperandStack) PopInt() int32
func (*OperandStack) PopLong ¶
func (self *OperandStack) PopLong() int64
func (*OperandStack) PopRef ¶
func (self *OperandStack) PopRef() *heap.Object
func (*OperandStack) PopSlot ¶
func (self *OperandStack) PopSlot() heap.Slot
func (*OperandStack) PushBoolean ¶
func (self *OperandStack) PushBoolean(val bool)
func (*OperandStack) PushDouble ¶
func (self *OperandStack) PushDouble(val float64)
double先变成long,然后按照long处理
func (*OperandStack) PushLong ¶
func (self *OperandStack) PushLong(val int64)
long变量入栈时,要拆成两个int。弹出时也弹两个int
type Thread ¶
type Thread struct {
// contains filtered or unexported fields
}
func (*Thread) ClearStack ¶
func (self *Thread) ClearStack()
func (*Thread) CurrentFrame ¶
func (*Thread) IsStackEmpty ¶
Click to show internal directories.
Click to hide internal directories.