Commits

Maciej Fijalkowski committed 40876c7

one more test

Comments (0)

Files changed (3)

pypy/jit/metainterp/optimizeopt/pure.py

                 self.last_emitted_operation = REMOVED
                 return
             else:
-                new_op = op.copy_if_modified_by_optimization(self.optimizer)
+                new_op = self.optimizer.getforwarded(op)
                 self.pure_operations.set(new_op, op)
                 self.remember_emitting_pure(op)
 
             # replace CALL_PURE with just CALL
+            xxx
             self.emit_operation(self.optimizer.copy_and_change(op, opnum))
         return optimize_CALL_PURE
     optimize_CALL_PURE_i = _new_optimize_call_pure(rop.CALL_i)
             # it was a CALL_PURE that was killed; so we also kill the
             # following GUARD_NO_EXCEPTION
             return
-        self.emit_operation(op)
+        return op
 
     def flush(self):
         assert self.posponedop is None

pypy/jit/metainterp/optimizeopt/rewrite.py

 from pypy.jit.metainterp.optimize import InvalidLoop
 from pypy.jit.metainterp.optimizeopt.intutils import IntBound
 from pypy.jit.metainterp.optimizeopt.optimizer import Optimization, CONST_1,\
-     CONST_0
+     CONST_0, REMOVED
 from pypy.jit.metainterp.resoperation import (opboolinvers, opboolreflex, rop,
                                               ConstInt, make_hashable_int,
                                               create_resop_2, Const,
             # it was a CALL_PURE or a CALL_LOOPINVARIANT that was killed;
             # so we also kill the following GUARD_NO_EXCEPTION
             return
-        self.emit_operation(op)
+        return op
 
     def optimize_INT_FLOORDIV(self, op):
         v1 = self.getvalue(op.getarg(0))

pypy/jit/metainterp/optimizeopt/vstring.py

     def optimize_GUARD_NO_EXCEPTION(self, op):
         if self.last_emitted_operation is REMOVED:
             return
-        self.emit_operation(op)
+        return op
 
     def opt_call_str_STR2UNICODE(self, op):
         # Constant-fold unicode("constant string").