Commits

Hakan Ardo  committed 46f3657 Merge

hg backout --merge 40391

  • Participants
  • Parent commits 0fa252d, edacf34
  • Branches jit-unroll-loops

Comments (0)

Files changed (1)

File pypy/jit/metainterp/optimizeopt/unroll.py

 from pypy.rlib.debug import debug_start, debug_stop, debug_print
 from pypy.jit.metainterp.optimizeutil import InvalidLoop, RetraceLoop
 from pypy.jit.metainterp.jitexc import JitException
-from pypy.jit.metainterp.history import make_hashable_int
 
 # FIXME: Introduce some VirtualOptimizer super class instead
 
         loop_ops = loop.operations
 
         boxmap = BoxMap()
-        state = ExeState(self.optimizer)
+        state = ExeState()
         short_preamble = []
         loop_i = preamble_i = 0
         while preamble_i < len(preamble_ops):
         return short_preamble
 
 class ExeState(object):
-    def __init__(self, optimizer):
-        self.optimizer = optimizer
+    def __init__(self):
         self.heap_dirty = False
         self.unsafe_getitem = {}
 
             if descr in self.unsafe_getitem:
                 return False
             return True
-        elif opnum == rop.CALL:
-            arg = op.getarg(0)
-            if isinstance(arg, Const):
-                key = make_hashable_int(arg.getint())
-                resvalue = self.optimizer.loop_invariant_results.get(key, None)
-                if resvalue:
-                    return True # This once was CALL_LOOPINVARIANT
-                                # FIXME: Can we realy be sure of that?
-        elif opnum == rop.GUARD_NO_EXCEPTION:
-            return True # FIXME: Is this safe?
         return False
     
     def update(self, op):