[pypy-commit] pypy expressions: fix generators
rlamy
noreply at buildbot.pypy.org
Tue Nov 11 02:39:03 CET 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: expressions
Changeset: r74437:ebe48f5de764
Date: 2014-11-09 01:48 +0000
http://bitbucket.org/pypy/pypy/changeset/ebe48f5de764/
Log: fix generators
diff --git a/rpython/flowspace/generator.py b/rpython/flowspace/generator.py
--- a/rpython/flowspace/generator.py
+++ b/rpython/flowspace/generator.py
@@ -106,6 +106,7 @@
def tweak_generator_body_graph(Entry, graph):
# First, always run simplify_graph in order to reduce the number of
# variables passed around
+ from rpython.annotator.expression import V_Type
simplify_graph(graph)
insert_empty_startblock(None, graph)
_insert_reads(graph.startblock, Entry.varnames)
@@ -115,7 +116,7 @@
#
stopblock = Block([])
op0 = op.simple_call(const(StopIteration))
- op1 = op.type(op0.result)
+ op1 = op.assign(V_Type(op0.result))
stopblock.operations = [op0, op1]
stopblock.closeblock(Link([op1.result, op0.result], graph.exceptblock))
#
More information about the pypy-commit
mailing list