예제 #1
0
 def writebytes(self):
     self.alignment = (self.outputfile.pos - self.wstartbyte + 1) % 4
     self.outputfile.write(getopbyte(self.op))
     if self.alignment != 0:
         self.outputfile.write(b'\x00' * (4 - self.alignment))
     for i in self.default, self.low, self.high:
         registeredclasses["u4"](self).writebytes(i)
     for i in self.switchtable:
         registeredclasses["u4"](self).writebytes(i)
예제 #2
0
def Noteq(type_):
    return getopbyte("if_icmpne", (4).to_bytes(2, "big")) + \
           getopbyte("iconst_1") + \
           getopbyte("goto", (1).to_bytes(2, "big")) + \
           getopbyte("iconst_0")
예제 #3
0
def Minus(type_):
    return getopbyte("isub")
예제 #4
0
def Gthan(type_):
    return getopbyte("if_icmpgt", (4).to_bytes(2, "big")) + \
           getopbyte("iconst_1") + \
           getopbyte("goto", (1).to_bytes(2, "big")) + \
           getopbyte("iconst_0")
예제 #5
0
def Shright(type_):
    return getopbyte("ishr")
예제 #6
0
def Shleft(type_):
    return getopbyte("ishl")
예제 #7
0
def Plus_(type_):
    return getopbyte("iadd")
예제 #8
0
def Or_(type_):
    return getopbyte("ior")
예제 #9
0
def And_(type_):
    return getopbyte("iand")
예제 #10
0
def Xor(type_):
    return getopbyte("ixor")
예제 #11
0
def Intdiv(type_):
    return getopbyte("idiv")
예제 #12
0
def Truediv(type_):
    return getopbyte("fdiv")
예제 #13
0
def Times(type_):
    return getopbyte("imul")
예제 #14
0
 def writebytes(self):
     self.outputfile.write(getopbyte(self.op))