[pypy-svn] r62506 - pypy/branch/pyjitpl5/pypy/jit/metainterp
fijal at codespeak.net
fijal at codespeak.net
Wed Mar 4 08:37:02 CET 2009
Author: fijal
Date: Wed Mar 4 08:37:00 2009
New Revision: 62506
Modified:
pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
Log:
Reuse got length of an array for future uses.
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py Wed Mar 4 08:37:00 2009
@@ -69,13 +69,10 @@
ad = ConstInt(ld.arraydescr)
if instnode.cursize == -1:
# fish fish fish
- res = cpu.execute_operation(rop.ARRAYLEN_GC,
- [instnode.source, ad],
- 'int')
- size = res.getint()
- else:
- size = instnode.cursize
- self.list_allocations.append((ad, size))
+ instnode.cursize= cpu.execute_operation(rop.ARRAYLEN_GC,
+ [instnode.source, ad],
+ 'int').getint()
+ self.list_allocations.append((ad, instnode.cursize))
res = (alloc_offset + 1) << 16
else:
alloc_offset = len(self.allocations)
More information about the Pypy-commit
mailing list