[pypy-svn] pypy arm-backend-2: Remove some XXX annotations from the register allocator

bivab commits-noreply at bitbucket.org
Wed Jan 12 10:18:00 CET 2011


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r40621:bd58da1858c7
Date: 2011-01-10 21:14 +0100
http://bitbucket.org/pypy/pypy/changeset/bd58da1858c7/

Log:	Remove some XXX annotations from the register allocator

diff --git a/pypy/jit/backend/arm/regalloc.py b/pypy/jit/backend/arm/regalloc.py
--- a/pypy/jit/backend/arm/regalloc.py
+++ b/pypy/jit/backend/arm/regalloc.py
@@ -110,11 +110,12 @@
 
     def _check_imm_arg(self, arg, size=0xFF, allow_zero=True):
         if isinstance(arg, ConstInt):
+            i = arg.getint()
             if allow_zero:
-                lower_bound = arg.getint() >= 0
+                lower_bound = i >= 0
             else:
-                lower_bound = arg.getint() > 0
-            return arg.getint() <= size and lower_bound
+                lower_bound = i > 0
+            return i <= size and lower_bound
         return False
 
     def _ensure_value_is_boxed(self, thing, forbidden_vars=[]):
@@ -141,7 +142,6 @@
 
 
     def prepare_op_int_add(self, op, fcond):
-        #XXX check if neg values are supported for imm values
         boxes = list(op.getarglist())
         a0, a1 = boxes
         imm_a0 = self._check_imm_arg(a0)
@@ -165,7 +165,6 @@
         return [l0, l1, res]
 
     def prepare_op_int_sub(self, op, fcond):
-        #XXX check if neg values are supported for imm values
         boxes = list(op.getarglist())
         a0, a1 = boxes
         imm_a0 = self._check_imm_arg(a0)
@@ -688,7 +687,7 @@
             arglocs.append(t)
         return arglocs
 
-    #XXX from ../x86/regalloc.py:791
+    # from ../x86/regalloc.py:791
     def _unpack_fielddescr(self, fielddescr):
         assert isinstance(fielddescr, BaseFieldDescr)
         ofs = fielddescr.offset
@@ -696,7 +695,7 @@
         ptr = fielddescr.is_pointer_field()
         return ofs, size, ptr
 
-    #XXX from ../x86/regalloc.py:779
+    # from ../x86/regalloc.py:779
     def _unpack_arraydescr(self, arraydescr):
         assert isinstance(arraydescr, BaseArrayDescr)
         cpu = self.cpu


More information about the Pypy-commit mailing list