Author: Richard Plangger <[email protected]>
Branch: fix-longevity
Changeset: r82511:bcfdedbf3019
Date: 2016-02-25 16:35 +0100
http://bitbucket.org/pypy/pypy/changeset/bcfdedbf3019/

Log:    (remi, plan_rich) did not save two files

diff --git a/rpython/jit/backend/llsupport/regalloc.py 
b/rpython/jit/backend/llsupport/regalloc.py
--- a/rpython/jit/backend/llsupport/regalloc.py
+++ b/rpython/jit/backend/llsupport/regalloc.py
@@ -672,13 +672,13 @@
             self.assembler.regalloc_mov(loc, result_loc)
             loc = result_loc
 
+
             #del self.reg_bindings[v]
             #if self.frame_manager.get(v) is None or self.has_free_registers():
             #    self._move_variable_away(v, loc)
 
             #self.reg_bindings[result_v] = loc
         else:
-            import pdb; pdb.set_trace()
             self._reallocate_from_to(v, result_v)
             loc = self.reg_bindings[result_v]
         return loc
@@ -804,7 +804,10 @@
 
     def get_call_argument_index(self, var, pos):
         assert self.dist_to_next_call[pos] >= 0
-        op = self.operations[pos + self.dist_to_next_call[pos]]
+        dist_to_call = self.dist_to_next_call[pos]
+        if dist_to_call < 0:
+            return -1
+        op = self.operations[pos + dist_to_call]
         for i,arg in enumerate(op.getarglist()):
             if arg is var:
                 return i-1 # first parameter is the functionh
@@ -817,7 +820,7 @@
         start, end = self.longevity[var]
         dist = self.dist_to_next_call[position]
         assert end >= position
-        if dist >= 0 and position + dist < end:
+        if dist >= 0 and position+dist < end:
             # the variable is used after the call instr
             return True
         return False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to