Documentation
¶
Index ¶
- Variables
- type Frame
- func (frame *Frame) AppendOnPopAction(action OnPopAction)
- func (frame *Frame) GetBootLoader() *heap.ClassLoader
- func (frame *Frame) GetClass() *heap.Class
- func (frame *Frame) GetClassLoader() *heap.ClassLoader
- func (frame *Frame) GetConstantPool() heap.ConstantPool
- func (frame *Frame) GetRuntime() *heap.Runtime
- func (frame *Frame) Load(idx uint, isLongOrDouble bool)
- func (frame *Frame) RevertNextPC()
- func (frame *Frame) Store(idx uint, isLongOrDouble bool)
- type FrameCache
- type LocalVars
- func (lv *LocalVars) DebugGetSlots() []heap.Slot
- func (lv *LocalVars) GetBooleanVar(index uint) bool
- func (lv *LocalVars) GetDoubleVar(index uint) float64
- func (lv *LocalVars) GetFloatVar(index uint) float32
- func (lv *LocalVars) GetIntVar(index uint) int32
- func (lv *LocalVars) GetLocalVar(index uint) heap.Slot
- func (lv *LocalVars) GetLongVar(index uint) int64
- func (lv *LocalVars) GetRefVar(index uint) *heap.Object
- func (lv *LocalVars) GetThis() *heap.Object
- func (lv *LocalVars) SetDoubleVar(index uint, val float64)
- func (lv *LocalVars) SetFloatVar(index uint, val float32)
- func (lv *LocalVars) SetIntVar(index uint, val int32)
- func (lv *LocalVars) SetLocalVar(index uint, slot heap.Slot)
- func (lv *LocalVars) SetLongVar(index uint, val int64)
- func (lv *LocalVars) SetRefVar(index uint, ref *heap.Object)
- type OnPopAction
- type OperandStack
- func (stack *OperandStack) ClearStack()
- func (stack *OperandStack) DebugGetSlots() []heap.Slot
- func (stack *OperandStack) HackSetSlots(slots []heap.Slot)
- func (stack *OperandStack) IsStackEmpty() bool
- func (stack *OperandStack) Pop() heap.Slot
- func (stack *OperandStack) PopBoolean() bool
- func (stack *OperandStack) PopDouble() float64
- func (stack *OperandStack) PopFloat() float32
- func (stack *OperandStack) PopInt() int32
- func (stack *OperandStack) PopL(isLongOrDouble bool) heap.Slot
- func (stack *OperandStack) PopLong() int64
- func (stack *OperandStack) PopRef() *heap.Object
- func (stack *OperandStack) PopTops(n uint) []heap.Slot
- func (stack *OperandStack) Push(slot heap.Slot)
- func (stack *OperandStack) PushBoolean(val bool)
- func (stack *OperandStack) PushDouble(val float64)
- func (stack *OperandStack) PushFloat(val float32)
- func (stack *OperandStack) PushInt(val int32)
- func (stack *OperandStack) PushL(slot heap.Slot, isLongOrDouble bool)
- func (stack *OperandStack) PushLong(val int64)
- func (stack *OperandStack) PushNull()
- func (stack *OperandStack) PushRef(ref *heap.Object)
- func (stack *OperandStack) TopRef(n uint) *heap.Object
- type Stack
- type Thread
- func (thread *Thread) CurrentFrame() *Frame
- func (thread *Thread) HackSetJThread(jThread *heap.Object)
- func (thread *Thread) HandleUncaughtException(ex *heap.Object)
- func (thread *Thread) InitClass(class *heap.Class)
- func (thread *Thread) Interrupt()
- func (thread *Thread) InvokeMethod(method *heap.Method)
- func (thread *Thread) InvokeMethodWithShim(method *heap.Method, args []heap.Slot)
- func (thread *Thread) IsInterrupted(clearInterrupted bool) bool
- func (thread *Thread) IsStackEmpty() bool
- func (thread *Thread) JThread() *heap.Object
- func (thread *Thread) NewFrame(method *heap.Method) *Frame
- func (thread *Thread) Park(d time.Duration)
- func (thread *Thread) PopFrame() *Frame
- func (thread *Thread) PushFrame(frame *Frame)
- func (thread *Thread) Sleep(d time.Duration) (interrupted bool)
- func (thread *Thread) StackDepth() uint
- func (thread *Thread) ThrowArrayIndexOutOfBoundsException(index int32)
- func (thread *Thread) ThrowArrayIndexOutOfBoundsExceptionNoMsg()
- func (thread *Thread) ThrowClassCastException(from, to *heap.Class)
- func (thread *Thread) ThrowClassNotFoundException(name string)
- func (thread *Thread) ThrowDivByZero()
- func (thread *Thread) ThrowFileNotFoundException(name string)
- func (thread *Thread) ThrowIOException(name string)
- func (thread *Thread) ThrowIllegalArgumentException(msg string)
- func (thread *Thread) ThrowInterruptedException(msg string)
- func (thread *Thread) ThrowNPE()
- func (thread *Thread) ThrowNegativeArraySizeException()
- func (thread *Thread) TopFrame() *Frame
- func (thread *Thread) TopFrameN(n uint) *Frame
- func (thread *Thread) Unpark()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ShimBootstrapMethod = &heap.Method{ ClassMember: newShimMember("<bootstrap>"), MethodData: heap.MethodData{ Code: []byte{0xff, 0xb1}, MaxStack: 8, MaxLocals: 8, }, ParamSlotCount: 2, } )
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
LocalVars
OperandStack
Thread *Thread
Method *heap.Method
NextPC int // the next instruction after the call
// contains filtered or unexported fields
}
stack frame
func (*Frame) AppendOnPopAction ¶
func (frame *Frame) AppendOnPopAction(action OnPopAction)
func (*Frame) GetBootLoader ¶
func (frame *Frame) GetBootLoader() *heap.ClassLoader
func (*Frame) GetConstantPool ¶
func (frame *Frame) GetConstantPool() heap.ConstantPool
func (*Frame) RevertNextPC ¶
func (frame *Frame) RevertNextPC()
type FrameCache ¶
type FrameCache struct {
// contains filtered or unexported fields
}
type LocalVars ¶
type LocalVars struct {
// contains filtered or unexported fields
}
func (*LocalVars) DebugGetSlots ¶
func (*LocalVars) GetBooleanVar ¶
func (*LocalVars) GetDoubleVar ¶
func (*LocalVars) GetFloatVar ¶
func (*LocalVars) GetLongVar ¶
func (*LocalVars) SetDoubleVar ¶
func (*LocalVars) SetFloatVar ¶
func (*LocalVars) SetLongVar ¶
type OnPopAction ¶
type OnPopAction func(popped *Frame)
type OperandStack ¶
type OperandStack struct {
// contains filtered or unexported fields
}
func (*OperandStack) ClearStack ¶
func (stack *OperandStack) ClearStack()
func (*OperandStack) DebugGetSlots ¶
func (stack *OperandStack) DebugGetSlots() []heap.Slot
func (*OperandStack) HackSetSlots ¶
func (stack *OperandStack) HackSetSlots(slots []heap.Slot)
only used by native methods
func (*OperandStack) IsStackEmpty ¶
func (stack *OperandStack) IsStackEmpty() bool
func (*OperandStack) Pop ¶
func (stack *OperandStack) Pop() heap.Slot
func (*OperandStack) PopBoolean ¶
func (stack *OperandStack) PopBoolean() bool
func (*OperandStack) PopDouble ¶
func (stack *OperandStack) PopDouble() float64
func (*OperandStack) PopFloat ¶
func (stack *OperandStack) PopFloat() float32
func (*OperandStack) PopInt ¶
func (stack *OperandStack) PopInt() int32
func (*OperandStack) PopLong ¶
func (stack *OperandStack) PopLong() int64
func (*OperandStack) PopRef ¶
func (stack *OperandStack) PopRef() *heap.Object
func (*OperandStack) Push ¶
func (stack *OperandStack) Push(slot heap.Slot)
func (*OperandStack) PushBoolean ¶
func (stack *OperandStack) PushBoolean(val bool)
func (*OperandStack) PushDouble ¶
func (stack *OperandStack) PushDouble(val float64)
double consumes two slots
func (*OperandStack) PushFloat ¶
func (stack *OperandStack) PushFloat(val float32)
func (*OperandStack) PushInt ¶
func (stack *OperandStack) PushInt(val int32)
func (*OperandStack) PushLong ¶
func (stack *OperandStack) PushLong(val int64)
long consumes two slots
func (*OperandStack) PushNull ¶
func (stack *OperandStack) PushNull()
func (*OperandStack) PushRef ¶
func (stack *OperandStack) PushRef(ref *heap.Object)
type Thread ¶
type Thread struct {
PC int // the address of the instruction currently being executed
VMOptions *vm.Options
JNIEnv interface{}
Runtime *heap.Runtime
// contains filtered or unexported fields
}
JVM
Thread
pc
Stack
Frame
LocalVars
OperandStack
func (*Thread) CurrentFrame ¶
func (*Thread) HandleUncaughtException ¶
func (*Thread) InvokeMethod ¶
func (*Thread) InvokeMethodWithShim ¶
func (*Thread) IsInterrupted ¶
func (*Thread) IsStackEmpty ¶
func (*Thread) StackDepth ¶
func (*Thread) ThrowArrayIndexOutOfBoundsException ¶
func (*Thread) ThrowArrayIndexOutOfBoundsExceptionNoMsg ¶
func (thread *Thread) ThrowArrayIndexOutOfBoundsExceptionNoMsg()
func (*Thread) ThrowClassCastException ¶
func (*Thread) ThrowClassNotFoundException ¶
func (*Thread) ThrowDivByZero ¶
func (thread *Thread) ThrowDivByZero()
func (*Thread) ThrowFileNotFoundException ¶
func (*Thread) ThrowIOException ¶
func (*Thread) ThrowIllegalArgumentException ¶
func (*Thread) ThrowInterruptedException ¶
func (*Thread) ThrowNegativeArraySizeException ¶
func (thread *Thread) ThrowNegativeArraySizeException()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.