Commits

Ronan Lamy committed 11e46d3

kill unnecessary generator_mark SpaceOperation

Comments (0)

Files changed (2)

rpython/flowspace/generator.py

     # First, always run simplify_graph in order to reduce the number of
     # variables passed around
     simplify_graph(graph)
-    #
-    assert graph.startblock.operations[0].opname == 'generator_mark'
-    graph.startblock.operations.pop(0)
-    #
     insert_empty_startblock(None, graph)
     _insert_reads(graph.startblock, Entry.varnames)
     Entry.block = graph.startblock

rpython/flowspace/pygraph.py

 """
 Implements flow graphs for Python callables
 """
-from rpython.flowspace.model import (FunctionGraph, Constant, Variable,
-        SpaceOperation)
+from rpython.flowspace.model import FunctionGraph, Constant, Variable
 from rpython.flowspace.framestate import FrameState
 
 class PyGraph(FunctionGraph):
             data[i] = Variable()
         state = FrameState(data + [Constant(None), Constant(None)], [], 0)
         initialblock = SpamBlock(state)
-        if code.is_generator:
-            initialblock.operations.append(
-                SpaceOperation('generator_mark', [], Variable()))
-
         super(PyGraph, self).__init__(self._sanitize_funcname(func), initialblock)
         self.func = func
         self.signature = code.signature