def op_RAISE_VARARGS(self, inst, exc): stmt = ir.Raise(exception=self.constants[exc], loc=self.loc) self.current_block.append(stmt)
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)
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])