示例#1
0
 def op_RAISE_VARARGS(self, inst, exc):
     stmt = ir.Raise(exception=self.constants[exc], loc=self.loc)
     self.current_block.append(stmt)
示例#2
0
 def op_RAISE_VARARGS(self, inst, exc):
     if exc is not None:
         exc = self.get(exc)
     stmt = ir.Raise(exception=exc, loc=self.loc)
     self.current_block.append(stmt)
示例#3
0
 def test_raise(self):
     a = ir.Raise(self.var_a, self.loc1)
     b = ir.Raise(self.var_a, self.loc1)
     c = ir.Raise(self.var_a, self.loc2)
     d = ir.Raise(self.var_b, self.loc1)
     self.check(a, same=[b, c], different=[d])