[pypy-commit] pypy less-stringly-ops: use op.* instead of SpaceOperation in flatten_star_args()

rlamy noreply at buildbot.pypy.org
Sat Nov 23 12:30:04 CET 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: less-stringly-ops
Changeset: r68284:0339d8e5180b
Date: 2013-11-23 12:27 +0100
http://bitbucket.org/pypy/pypy/changeset/0339d8e5180b/

Log:	use op.* instead of SpaceOperation in flatten_star_args()

diff --git a/rpython/annotator/specialize.py b/rpython/annotator/specialize.py
--- a/rpython/annotator/specialize.py
+++ b/rpython/annotator/specialize.py
@@ -5,6 +5,7 @@
 from rpython.tool.algo.unionfind import UnionFind
 from rpython.flowspace.model import Block, Link, Variable, SpaceOperation
 from rpython.flowspace.model import checkgraph
+from rpython.flowspace.operation import op
 from rpython.annotator import model as annmodel
 from rpython.flowspace.argument import Signature
 
@@ -33,7 +34,8 @@
             argscopy = [Variable(v) for v in graph.getargs()]
             starargs = [Variable('stararg%d'%i) for i in range(nb_extra_args)]
             newstartblock = Block(argscopy[:-1] + starargs)
-            newtup = SpaceOperation('newtuple', starargs, argscopy[-1])
+            newtup = op.newtuple(*starargs)
+            newtup.result = argscopy[-1]
             newstartblock.operations.append(newtup)
             newstartblock.closeblock(Link(argscopy, graph.startblock))
             graph.startblock = newstartblock


More information about the pypy-commit mailing list