[pypy-svn] r71375 - pypy/trunk/pypy/jit/backend/x86/tool
arigo at codespeak.net
arigo at codespeak.net
Sun Feb 21 15:01:35 CET 2010
Author: arigo
Date: Sun Feb 21 15:01:33 2010
New Revision: 71375
Modified:
pypy/trunk/pypy/jit/backend/x86/tool/viewcode.py
Log:
(merge of r71371)
Fix: don't keep all output code in memory, when called with --text.
Modified: pypy/trunk/pypy/jit/backend/x86/tool/viewcode.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/tool/viewcode.py (original)
+++ pypy/trunk/pypy/jit/backend/x86/tool/viewcode.py Sun Feb 21 15:01:33 2010
@@ -262,6 +262,13 @@
if showgraph:
g1.display()
+ def showtextonly(self):
+ self.ranges.sort()
+ for r in self.ranges:
+ disassembled = r.disassemble()
+ print disassembled
+ del r.text
+
def tab2columns(text):
lines = text.split('\n')
@@ -365,4 +372,6 @@
world.parse(f)
if showgraph:
world.find_cross_references()
- world.show(showtext=True, showgraph=showgraph)
+ world.show(showtext=True)
+ else:
+ world.showtextonly()
More information about the Pypy-commit
mailing list