Author: Ronan Lamy <[email protected]>
Branch: expressions-2
Changeset: r74555:02c004e892a3
Date: 2014-11-09 01:48 +0000
http://bitbucket.org/pypy/pypy/changeset/02c004e892a3/
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))
#
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit