Exemplo n.º 1
0
 def test_yield(self):
     a = ir.Yield(self.var_a, self.loc1, 0)
     b = ir.Yield(self.var_a, self.loc1, 0)
     c = ir.Yield(self.var_a, self.loc2, 0)
     d = ir.Yield(self.var_b, self.loc1, 0)
     e = ir.Yield(self.var_a, self.loc1, 1)
     self.check(a, same=[b, c], different=[d, e])
Exemplo n.º 2
0
 def op_YIELD_VALUE(self, inst, value, res):
     # initialize index to None.  it's being set later in post-processing
     index = None
     inst = ir.Yield(value=self.get(value), index=index, loc=self.loc)
     return self.store(inst, res)