func newShimFrame(thread *Thread, args []interface{}) *Frame { frame := &Frame{} frame.thread = thread frame.method = rtc.ReturnMethod() frame.operandStack = &OperandStack{ size: uint(len(args)), slots: args, } return frame }
func callClinit(thread *Thread, class *rtc.Class) { clinit := class.GetClinitMethod() if clinit == nil { clinit = rtc.ReturnMethod() // just do nothing } // exec <clinit> newFrame := thread.NewFrame(clinit) newFrame.SetOnPopAction(func() { // step 10 initSucceeded(class) }) thread.PushFrame(newFrame) }