示例#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))