示例#1
0
 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
示例#2
0
 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
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
 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)
示例#7
0
 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)