[pypy-svn] r78604 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt
arigo at codespeak.net
arigo at codespeak.net
Sun Oct 31 14:47:13 CET 2010
Author: arigo
Date: Sun Oct 31 14:47:12 2010
New Revision: 78604
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/unroll.py
Log:
simplification.
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/unroll.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/unroll.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/unroll.py Sun Oct 31 14:47:12 2010
@@ -116,17 +116,7 @@
def inline_snapshot(self, snapshot):
if snapshot in self.snapshot_map:
return self.snapshot_map[snapshot]
- boxes = []
- for a in snapshot.boxes:
- if isinstance(a, Const):
- boxes.append(a)
- else:
- boxes.append(self.inline_arg(a))
- new_snapshot = Snapshot(self.inline_snapshot(snapshot.prev), boxes[:])
+ boxes = [self.inline_arg(a) for a in snapshot.boxes]
+ new_snapshot = Snapshot(self.inline_snapshot(snapshot.prev), boxes)
self.snapshot_map[snapshot] = new_snapshot
return new_snapshot
-
-
-
-
-
More information about the Pypy-commit
mailing list