def GenBasicBlocks(self):
    ' Generate basic blocks using the algorithm '
    if (len(self.instructions) == 0):
        return
    bbCount = 0
    self.basicBlocks = [BB.BasicBlock()]
    self.basicBlocks[(- 1)].AddInstruction(self.instructions[0])
    for instr in self.instructions[1:]:
        if instr.IsTarget():
            bbCount += 1
            self.basicBlocks += [BB.BasicBlock(bbCount)]
        self.basicBlocks[(- 1)].AddInstruction(instr)
        if instr.instrType.is_JMP():
            bbCount += 1
            self.basicBlocks += [BB.BasicBlock(bbCount)]
    self.basicBlocks = [bb for bb in self.basicBlocks if (not bb.IsEmpty())]
    for (i, bb) in enumerate(self.basicBlocks):
        bb.bbNum = i
Generate basic blocks using the algorithm
def GenBasicBlocks(self):
    '  '
    if (len(self.instructions) == 0):
        return
    bbCount = 0
    self.basicBlocks = [BB.BasicBlock()]
    self.basicBlocks[(- 1)].AddInstruction(self.instructions[0])
    for instr in self.instructions[1:]:
        if instr.IsTarget():
            bbCount += 1
            self.basicBlocks += [BB.BasicBlock(bbCount)]
        self.basicBlocks[(- 1)].AddInstruction(instr)
        if instr.instrType.is_JMP():
            bbCount += 1
            self.basicBlocks += [BB.BasicBlock(bbCount)]
    self.basicBlocks = [bb for bb in self.basicBlocks if (not bb.IsEmpty())]
    for (i, bb) in enumerate(self.basicBlocks):
        bb.bbNum = i