[pypy-svn] r10343 - pypy/dist/pypy/translator
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Tue Apr 5 19:30:55 CEST 2005
Author: sanxiyn
Date: Tue Apr 5 19:30:55 2005
New Revision: 10343
Modified:
pypy/dist/pypy/translator/transform.py
Log:
move comments around
Modified: pypy/dist/pypy/translator/transform.py
==============================================================================
--- pypy/dist/pypy/translator/transform.py (original)
+++ pypy/dist/pypy/translator/transform.py Tue Apr 5 19:30:55 2005
@@ -11,21 +11,13 @@
from pypy.translator.annrpython import CannotSimplify
from pypy.annotation import model as annmodel
-# XXX: Lots of duplicated codes. Fix this!
+def fully_annotated_blocks(self):
+ """Ignore blocked blocks."""
+ for block, is_annotated in self.annotated.iteritems():
+ if is_annotated:
+ yield block
-# ----------------------------------------------------------------------
-# The 'call_args' operation is the strangest one. The meaning of its
-# arguments is as follows:
-#
-# call_args(<callable>, <shape>, <arg0>, <arg1>, <arg2>...)
-#
-# The shape must be a constant object, which describes how the remaining
-# arguments are regrouped. The class pypy.interpreter.argument.Arguments
-# has a method 'fromshape(shape, list-of-args)' that reconstructs a complete
-# Arguments instance from this information. Don't try to interpret the
-# shape anywhere else, but for reference, it is a 3-tuple:
-# (number-of-pos-arg, tuple-of-keyword-names, flag-presence-of-*-arg)
-# ----------------------------------------------------------------------
+# XXX: Lots of duplicated codes. Fix this!
# [a] * b
# -->
@@ -34,12 +26,6 @@
# -->
# d = alloc_and_set(b, a)
-def fully_annotated_blocks(self):
- """Ignore blocked blocks."""
- for block, is_annotated in self.annotated.iteritems():
- if is_annotated:
- yield block
-
def transform_allocate(self):
"""Transforms [a] * b to alloc_and_set(b, a) where b is int."""
for block in fully_annotated_blocks(self):
@@ -90,6 +76,20 @@
# -->
# e = simple_call(a, *b)
+# ----------------------------------------------------------------------
+# The 'call_args' operation is the strangest one. The meaning of its
+# arguments is as follows:
+#
+# call_args(<callable>, <shape>, <arg0>, <arg1>, <arg2>...)
+#
+# The shape must be a constant object, which describes how the remaining
+# arguments are regrouped. The class pypy.interpreter.argument.Arguments
+# has a method 'fromshape(shape, list-of-args)' that reconstructs a complete
+# Arguments instance from this information. Don't try to interpret the
+# shape anywhere else, but for reference, it is a 3-tuple:
+# (number-of-pos-arg, tuple-of-keyword-names, flag-presence-of-*-arg)
+# ----------------------------------------------------------------------
+
## REMOVED: now FlowObjSpace produces 'call_args' operations only
##def transform_simple_call(self):
## """Transforms call(a, (...), {}) to simple_call(a, ...)"""
More information about the Pypy-commit
mailing list