func (self *LOOKUP_SWITCH) Execute(frame *rtda.Frame) { key := frame.OperandStack().PopInt() for i := int32(0); i < self.npairs*2; i += 2 { if self.matchOffsets[i] == key { offset := self.matchOffsets[i+1] base.Branch(frame, int(offset)) return } } base.Branch(frame, int(self.defaultOffset)) }
func (self *TABLE_SWITCH) Execute(frame *rtda.Frame) { index := frame.OperandStack().PopInt() var offset int if index >= self.low && index <= self.high { offset = int(self.jumpOffsets[index-self.low]) } else { offset = int(self.defaultOffset) } base.Branch(frame, offset) }
func (self *IFGE) Execute(frame *rtda.Frame) { val := frame.OperandStack().PopInt() if val >= 0 { base.Branch(frame, self.Offset) } }
func (self *IFNONNULL) Execute(frame *rtda.Frame) { ref := frame.OperandStack().PopRef() if ref != nil { base.Branch(frame, self.Offset) } }
func (self *IF_ACMPNE) Execute(frame *rtda.Frame) { if !_acmp(frame) { base.Branch(frame, self.Offset) } }
func (self *IF_ICMPGE) Execute(frame *rtda.Frame) { if val1, val2 := _icmpPop(frame); val1 >= val2 { base.Branch(frame, self.Offset) } }
func (self *GOTO_W) Execute(frame *rtda.Frame) { base.Branch(frame, self.offset) }