コード例 #1
0
 def toBB(self, Labellist, cBB):
     if not cBB:
         cBB = BB()
     if cBB.instrs():
         newBB = BB()
         newBB.add_instruction(self)
         cBB.add_link(newBB)
         return newBB
     cBB.add_instruction(self)
     return cBB
コード例 #2
0
    def toBB(self, Labellist, cBB):
        if not cBB:
            cBB = BB()

        if not self.is_leader() or not cBB.instrs():
            cBB.add_instruction(self)
            return cBB

        newBB = BB()
        newBB.add_instruction(self)
        cBB.add_link(newBB)
        return newBB
コード例 #3
0
    def toBB(self, Labellist, cBB):
        firstBB = Instruction.toBB(self, Labellist, cBB)
        lastBB = BB()

        if self._true:
            newBB = self._true.toBB(Labellist, firstBB)
            newBB.add_link(lastBB)

        if self._false:
            newBB = self._false.toBB(Labellist, firstBB)
            newBB.add_link(lastBB)
        else:
            firstBB.add_link(lastBB)

        return lastBB
コード例 #4
0
 def toBB(self, Labellist, cBB):
     cBB = Instruction.toBB(self, Labellist, cBB)
     lastBB = BB()
     cBB.add_link(lastBB)
     Labellist['%s' % self._label] = cBB
     return lastBB
コード例 #5
0
 def toBB(self, Labellist, cBB):
     cBB = Instruction.toBB(self, Labellist, cBB)
     lastBB = BB()
     cBB.add_link(lastBB)
     return lastBB