コード例 #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
ファイル: annrpython.py プロジェクト: cimarieta/usp
 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
ファイル: annrpython.py プロジェクト: mozillazg/pypy
 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
ファイル: annrpython.py プロジェクト: praveenmunagapati/pypy
 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
ファイル: flowcontext.py プロジェクト: yuyichao/pypy
 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
ファイル: flowcontext.py プロジェクト: zielmicha/pypy
 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
ファイル: flowcontext.py プロジェクト: charred/pypy
 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)