[pypy-svn] r65553 - pypy/branch/pyjitpl5-experiments/pypy/jit/backend/cli
antocuni at codespeak.net
antocuni at codespeak.net
Wed Jun 3 10:39:31 CEST 2009
Author: antocuni
Date: Wed Jun 3 10:39:29 2009
New Revision: 65553
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/cli/method.py
Log:
look also in suboperations
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/cli/method.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/cli/method.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/cli/method.py Wed Jun 3 10:39:29 2009
@@ -185,7 +185,7 @@
def setoptions(self):
opts = os.environ.get('PYPYJITOPT')
- if opts is None:
+ if not opts:
return
parts = opts.split(' ')
for part in parts:
@@ -199,16 +199,19 @@
else:
os.write(2, 'Warning: invalid option name: %s\n' % name)
- def compute_types(self):
- # XXX: look also in op.suboperations
- box2classes = {} # box --> [ootype.Class]
- for op in self.loop.operations:
+ def _collect_types(self, operations, box2classes):
+ for op in operations:
if op.opnum in (rop.GETFIELD_GC, rop.SETFIELD_GC):
box = op.args[0]
descr = op.descr
assert isinstance(descr, runner.FieldDescr)
box2classes.setdefault(box, []).append(descr.selfclass)
+ if op.suboperations:
+ self._collect_types(op.suboperations, box2classes)
+ def compute_types(self):
+ box2classes = {} # box --> [ootype.Class]
+ self._collect_types(self.loop.operations, box2classes)
for box, classes in box2classes.iteritems():
cls = classes[0]
for cls2 in classes[1:]:
More information about the Pypy-commit
mailing list