Beispiel #1
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     v2 = stack.PopDouble()
     v1 = statk.PopDouble()
     result = v1 + v2
     stack.PushDouble(result)
Beispiel #2
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     f = stack.PopFloat()
     l = struct.unpack('>q', struct.pack('>f', f))[0]
     stack.pushDoulbe(l)
Beispiel #3
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     i = stack.PopInt()
     d = struct.unpack('>d', struct.pack('>i', i))[0]
     stack.pushInt(d)
Beispiel #4
0
 def Execute(self, frame: rtda.Frame):
     thread = frame.Thread()
     currentFrame = thread.PopFrame()
     invokerFrame = thread.TopFrame()
     ref = currentFrame.OperandStack().PopRef()
     invokerFrame.OperandStack().PushRef(ref)
Beispiel #5
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     l = stack.PopLong()
     i = struct.unpack('>i', struct.pack('>q', l))[0]
     stack.pushInt(i)
Beispiel #6
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     slot1 = stack.PopSlot()
     slot2 = stack.PopSlot()
     stack.PushSlot(slot1)
     stack.PushSlot(slot2)
Beispiel #7
0
 def Execute(self, frame:rtda.Frame):
     ref = frame.OperandStack().PopRef()
     if ref != None:
         base.Branch(frame, self.Offset)
Beispiel #8
0
 def Execute(self, frame: rtda.Frame):
     frame.OperandStack().PushLong(1)
Beispiel #9
0
 def Execute(self, frame: rtda.Frame):
     i = int(self.val)
     frame.OperandStack().PushInt(i)
Beispiel #10
0
 def Execute(self, frame: rtda.Frame):
     frame.OperandStack().PushFloat(2.0)
Beispiel #11
0
 def Execute(self, frame: rtda.Frame):
     frame.OperandStack().PushInt(-1)
Beispiel #12
0
 def Execute(self, frame: rtda.Frame):
     frame.OperandStack().PushDouble(1.0)
Beispiel #13
0
 def Execute(self, frame: rtda.Frame):
     frame.OperandStack().PushRef(None)
Beispiel #14
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     v2 = stack.PopFloat()
     v1 = statk.PopFloat()
     result = v1 / v2
     stack.PushFloat(result)
Beispiel #15
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     slot = stack.PopSlot()
     stack.PushSlot(slot)
     stack.PushSlot(copy.deepcopy(slot))
Beispiel #16
0
def Branch(frame: rtda.Frame, offset: int):
    pc = frame.Thread().PC()
    nextPC = pc + offset
    frame.SetNextPC(nextPC)
Beispiel #17
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     stack.PopSlot()
Beispiel #18
0
def _lload(frame: rtda.Frame, index):
    val = frame.LocalVars().GetLong(index)
    frame.OperandStack().PushLong(val)
Beispiel #19
0
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}")
Beispiel #20
0
def _dload(frame: rtda.Frame, index):
    val = frame.LocalVars().GetDouble(index)
    frame.OperandStack().PushDouble(val)
Beispiel #21
0
 def Execute(self, frame: rtda.Frame):
     frame.Thread().PopFrame()
Beispiel #22
0
def _aload(frame: rtda.Frame, index):
    ref = frame.LocalVars().GetRef(index)
    frame.OperandStack().PushRef(ref)
Beispiel #23
0
 def Execute(self, frame: rtda.Frame):
     thread = frame.Thread()
     currentFrame = thread.PopFrame()
     invokerFrame = thread.TopFrame()
     retVal = currentFrame.OperandStack().PopLong()
     invokerFrame.OperandStack().PushLong(retVal)
Beispiel #24
0
def _fload(frame: rtda.Frame, index):
    val = frame.LocalVars().GetFloat(index)
    frame.OperandStack.PushFloat(val)
Beispiel #25
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     d = stack.PopDoulbe()
     l = struct.unpack('>q', struct.pack('>d', d))[0]
     stack.pushInf(l)
Beispiel #26
0
def _iload(frame: rtda.Frame, index):
    val = frame.LocalVars().GetInt(index)
    frame.OperandStack().PushInt(val)
Beispiel #27
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     d = stack.PopDoulbe()
     f = struct.unpack('>f', struct.pack('>d', d))[0]
     stack.pushFloat(f)
Beispiel #28
0
def branch(frame: Frame, offset):
    pc = frame.thread.pc
    next_pc = pc + offset
    frame.next_pc = next_pc
Beispiel #29
0
def _lstore(frame: rtda.Frame, index):
    val = frame.OperandStack().PopLong()
    frame.LocalVars().SetLong(index, val)
Beispiel #30
0
 def Execute(self, frame: rtda.Frame):
     stack = frame.OperandStack()
     v2 = stack.PopLong()
     v1 = statk.PopLong()
     result = v1 and v2
     stack.PushLong(result)