[pypy-commit] pypy jit-duplicated_short_boxes: cleaner and simpler
hakanardo
noreply at buildbot.pypy.org
Tue Aug 30 09:48:47 CEST 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-duplicated_short_boxes
Changeset: r46917:74057c67630a
Date: 2011-08-30 09:47 +0200
http://bitbucket.org/pypy/pypy/changeset/74057c67630a/
Log: cleaner and simpler
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
@@ -63,7 +63,7 @@
else:
self.lenbound = LenBound(mode, descr, IntLowerBound(val + 1))
- def make_guards(self, box, ignore_lenbound=False):
+ def make_guards(self, box):
guards = []
if self.level == LEVEL_CONSTANT:
op = ResOperation(rop.GUARD_VALUE, [box, self.box], None)
@@ -78,7 +78,7 @@
op = ResOperation(rop.GUARD_NONNULL, [box], None)
guards.append(op)
self.intbound.make_guards(box, guards)
- if self.lenbound and not ignore_lenbound:
+ if self.lenbound:
lenbox = BoxInt()
if self.lenbound.mode == MODE_ARRAY:
op = ResOperation(rop.ARRAYLEN_GC, [box], lenbox, self.lenbound.descr)
diff --git a/pypy/jit/metainterp/optimizeopt/unroll.py b/pypy/jit/metainterp/optimizeopt/unroll.py
--- a/pypy/jit/metainterp/optimizeopt/unroll.py
+++ b/pypy/jit/metainterp/optimizeopt/unroll.py
@@ -161,9 +161,9 @@
if box in seen:
continue
seen[box] = True
- value = preamble_optimizer.getvalue(box)
- inputarg_setup_ops.extend(value.make_guards(box, ignore_lenbound=True))
- # FIXME: Use a ValueImporter instead of make_guards
+ preamble_value = preamble_optimizer.getvalue(box)
+ value = self.optimizer.getvalue(box)
+ value.import_from(preamble_value, self.optimizer)
for box in short_inputargs:
if box in seen:
continue
More information about the pypy-commit
mailing list