Commits

Anonymous committed 1a13d91

documented what the hell complex and verbose transform codes
are actually doing. let's refactor it. Python shall be
an executable pseudocode!

  • Participants
  • Parent commits 3177e09

Comments (0)

Files changed (1)

pypy/translator/transform.py

 from pypy.objspace.flow.model import Variable, Constant, SpaceOperation
 from pypy.translator.annotation import Annotator
 
+# b = newlist(a)
+# d = mul(b, int c)
+# --> d = alloc_and_set(c, a)
+
 def transform_allocate(self):
     for block, ann in self.annotated.iteritems():
         operations = block.operations[:]
                                         op2.result)
                 block.operations[i:i+2] = [new_op]
 
+# c = newslice(a, b, None)
+# e = getitem(d, c)
+# --> e = getslice(d, a, b)
+
 def transform_slice(self):
     for block, ann in self.annotated.iteritems():
         operations = block.operations[:]