[pypy-svn] r23313 - pypy/dist/pypy/translator/backendopt

ericvrp at codespeak.net ericvrp at codespeak.net
Tue Feb 14 10:55:45 CET 2006


Author: ericvrp
Date: Tue Feb 14 10:55:43 2006
New Revision: 23313

Added:
   pypy/dist/pypy/translator/backendopt/stackless.py
Log:
Placeholder for stackless transformation. (nothing much here yet)


Added: pypy/dist/pypy/translator/backendopt/stackless.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/backendopt/stackless.py	Tue Feb 14 10:55:43 2006
@@ -0,0 +1,22 @@
+"""This produces a graph in the style that was manually experimented
+with in http://codespeak.net/svn/user/arigo/hack/misc/stackless.c
+And is meant to replace stackless support in the PyPy backends.
+"""
+
+from pypy.translator.backendopt.support import log, all_operations, annotate
+log = log.stackless
+
+def stackless(translator):
+    log('starting')
+    seen = {}
+    for op in all_operations(translator):
+        try:
+            seen[op.opname] += 1
+        except:
+            seen[op.opname] = 1
+
+    #statistics...
+    for k, v in seen.iteritems():
+        log("%dx %s" % (v, k))
+
+    log('finished')



More information about the Pypy-commit mailing list