def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() v2 = stack.PopDouble() v1 = statk.PopDouble() result = v1 + v2 stack.PushDouble(result)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() f = stack.PopFloat() l = struct.unpack('>q', struct.pack('>f', f))[0] stack.pushDoulbe(l)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() i = stack.PopInt() d = struct.unpack('>d', struct.pack('>i', i))[0] stack.pushInt(d)
def Execute(self, frame: rtda.Frame): thread = frame.Thread() currentFrame = thread.PopFrame() invokerFrame = thread.TopFrame() ref = currentFrame.OperandStack().PopRef() invokerFrame.OperandStack().PushRef(ref)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() l = stack.PopLong() i = struct.unpack('>i', struct.pack('>q', l))[0] stack.pushInt(i)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() slot1 = stack.PopSlot() slot2 = stack.PopSlot() stack.PushSlot(slot1) stack.PushSlot(slot2)
def Execute(self, frame:rtda.Frame): ref = frame.OperandStack().PopRef() if ref != None: base.Branch(frame, self.Offset)
def Execute(self, frame: rtda.Frame): frame.OperandStack().PushLong(1)
def Execute(self, frame: rtda.Frame): i = int(self.val) frame.OperandStack().PushInt(i)
def Execute(self, frame: rtda.Frame): frame.OperandStack().PushFloat(2.0)
def Execute(self, frame: rtda.Frame): frame.OperandStack().PushInt(-1)
def Execute(self, frame: rtda.Frame): frame.OperandStack().PushDouble(1.0)
def Execute(self, frame: rtda.Frame): frame.OperandStack().PushRef(None)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() v2 = stack.PopFloat() v1 = statk.PopFloat() result = v1 / v2 stack.PushFloat(result)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() slot = stack.PopSlot() stack.PushSlot(slot) stack.PushSlot(copy.deepcopy(slot))
def Branch(frame: rtda.Frame, offset: int): pc = frame.Thread().PC() nextPC = pc + offset frame.SetNextPC(nextPC)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() stack.PopSlot()
def _lload(frame: rtda.Frame, index): val = frame.LocalVars().GetLong(index) frame.OperandStack().PushLong(val)
def logInstruction(frame: rtda.Frame, inst: instructions.base.Instruction): method = frame.Method() className = method.Class().Name() methodName = method.Name() pc = frame.Thread().PC() print(f"{className}.{methodName} #{pc} {inst} {inst}")
def _dload(frame: rtda.Frame, index): val = frame.LocalVars().GetDouble(index) frame.OperandStack().PushDouble(val)
def Execute(self, frame: rtda.Frame): frame.Thread().PopFrame()
def _aload(frame: rtda.Frame, index): ref = frame.LocalVars().GetRef(index) frame.OperandStack().PushRef(ref)
def Execute(self, frame: rtda.Frame): thread = frame.Thread() currentFrame = thread.PopFrame() invokerFrame = thread.TopFrame() retVal = currentFrame.OperandStack().PopLong() invokerFrame.OperandStack().PushLong(retVal)
def _fload(frame: rtda.Frame, index): val = frame.LocalVars().GetFloat(index) frame.OperandStack.PushFloat(val)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() d = stack.PopDoulbe() l = struct.unpack('>q', struct.pack('>d', d))[0] stack.pushInf(l)
def _iload(frame: rtda.Frame, index): val = frame.LocalVars().GetInt(index) frame.OperandStack().PushInt(val)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() d = stack.PopDoulbe() f = struct.unpack('>f', struct.pack('>d', d))[0] stack.pushFloat(f)
def branch(frame: Frame, offset): pc = frame.thread.pc next_pc = pc + offset frame.next_pc = next_pc
def _lstore(frame: rtda.Frame, index): val = frame.OperandStack().PopLong() frame.LocalVars().SetLong(index, val)
def Execute(self, frame: rtda.Frame): stack = frame.OperandStack() v2 = stack.PopLong() v1 = statk.PopLong() result = v1 and v2 stack.PushLong(result)