[pypy-svn] pypy arm-backend-2: merge default

bivab commits-noreply at bitbucket.org
Thu Dec 23 11:23:25 CET 2010


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r40204:0356977d27b3
Date: 2010-12-23 11:22 +0100
http://bitbucket.org/pypy/pypy/changeset/0356977d27b3/

Log:	merge default

diff --git a/pypy/jit/metainterp/optimizeopt/optimizer.py b/pypy/jit/metainterp/optimizeopt/optimizer.py
--- a/pypy/jit/metainterp/optimizeopt/optimizer.py
+++ b/pypy/jit/metainterp/optimizeopt/optimizer.py
@@ -380,14 +380,18 @@
         return op
 
     def make_args_key(self, op):
-        args = []
-        for i in range(op.numargs()):
+        n = op.numargs()
+        args = [None] * (n + 1)
+        for i in range(n):
             arg = op.getarg(i)
-            if arg in self.values:
-                args.append(self.values[arg].get_key_box())
+            try:
+                value = self.values[arg]
+            except KeyError:
+                pass
             else:
-                args.append(arg)
-        args.append(ConstInt(op.getopnum()))
+                arg = value.get_key_box()
+            args[i] = arg
+        args[n] = ConstInt(op.getopnum())
         return args
 
     def optimize_default(self, op):


More information about the Pypy-commit mailing list