Commits

Ronan Lamy  committed 5a488bd

Split off _init_graph() from FlowExecutionContext.__init__()

  • Participants
  • Parent commits a86581f
  • Branches translation-cleanup

Comments (0)

Files changed (1)

File pypy/objspace/flow/flowcontext.py

         self.joinpoints = {}
         initialblock = SpamBlock(frame.getstate().copy())
         self.pendingblocks = collections.deque([initialblock])
+        self._init_graph(func, initialblock)
 
+    def _init_graph(self, func, initialblock):
         # CallableFactory.pycall may add class_ to functions that are methods
         name = func.func_name
         class_ = getattr(func, 'class_', None)
         # attach a signature and defaults to the graph
         # so that it becomes even more interchangeable with the function
         # itself
-        graph.signature = code.signature()
+        graph.signature = self.code.signature()
         graph.defaults = func.func_defaults or ()
 
     make_link = Link # overridable for transition tracking