def mergeinputargs(self, graph, block, inputcells): # Merge the new 'cells' with each of the block's existing input # variables. oldcells = [self.binding(a) for a in block.inputargs] try: unions = [annmodel.unionof(c1,c2) for c1, c2 in zip(oldcells,inputcells)] except annmodel.UnionError, e: # Add source code to the UnionError e.source = '\n'.join(source_lines(graph, block, None, long=True)) raise
def mergeinputargs(self, graph, block, inputcells): # Merge the new 'cells' with each of the block's existing input # variables. oldcells = [self.binding(a) for a in block.inputargs] try: unions = [annmodel.unionof(c1,c2) for c1, c2 in zip(oldcells,inputcells)] except annmodel.UnionError as e: # Add source code to the UnionError e.source = '\n'.join(source_lines(graph, block, None, long=True)) if self.keepgoing: self.errors.append(e) self.failed_blocks.add(block) return raise # if the merged cells changed, we must redo the analysis if unions != oldcells: self.bindinputargs(graph, block, unions)
def mergeinputargs(self, graph, block, inputcells): # Merge the new 'cells' with each of the block's existing input # variables. oldcells = [self.binding(a) for a in block.inputargs] try: unions = [ annmodel.unionof(c1, c2) for c1, c2 in zip(oldcells, inputcells) ] except annmodel.UnionError as e: # Add source code to the UnionError e.source = '\n'.join(source_lines(graph, block, None, long=True)) if self.keepgoing: self.errors.append(e) self.failed_blocks.add(block) return raise # if the merged cells changed, we must redo the analysis if unions != oldcells: self.bindinputargs(graph, block, unions)
def __str__(self): msg = ["\n"] msg += map(str, self.args) msg += [""] msg += source_lines(self.ctx.graph, None, offset=self.ctx.last_instr) return "\n".join(msg)
def __str__(self): msg = ["\n"] msg += map(str, self.args) msg += [""] msg += source_lines(self.ctx.graph, None, offset=self.ctx.last_offset) return "\n".join(msg)
def __str__(self): msg = ['-+' * 30] msg += map(str, self.args) msg += source_lines(self.frame.graph, None, offset=self.frame.last_instr) return "\n".join(msg)