1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 2ec1ac5

Bug fix: don't use self.optimizer.propagate_forward(newop). It's
.send_extra_operation() that is meant here...

  • Participants
  • Parent commits 0e66e74
  • Branches default

Comments (0)

Files changed (2)

File rpython/jit/metainterp/optimizeopt/rewrite.py

View file
  • Ignore whitespace
                                       [op.getarg(1),
                                        ConstInt(index + source_start)], resbox,
                                        descr=arraydescr)
-                    self.optimizer.propagate_forward(newop)
+                    self.optimizer.send_extra_operation(newop)
                     val = self.getvalue(resbox)
                 if dest_value.is_virtual():
                     dest_value.setitem(index + dest_start, val)

File rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py

View file
  • Ignore whitespace
         """
         expected = """
         [i1, i2]
+        # operations are not all removed because this new_array() is var-sized
         p1 = new_array(i1, descr=arraydescr)
-        # operations are not all removed because this new_array() is var-sized
-        # unsure exactly which operations should be left, but right now it's
-        # really buggy
+        setarrayitem_gc(p1, 0, i2, descr=arraydescr)
         jump(i1, i2)
         """
         self.optimize_loop(ops, expected)