Commit ec54ccca authored by Stefan Behnel's avatar Stefan Behnel

Avoid a circular import of the (compiled) FlowControl module.

parent de9f7614
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
from __future__ import absolute_import from __future__ import absolute_import
import cython import cython
cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, Builtin=object,
Builtin=object, InternalError=object, error=object, warning=object, Options=object, TreeVisitor=object, CythonTransform=object,
InternalError=object, error=object, warning=object,
fake_rhs_expr=object, TypedExprNode=object) fake_rhs_expr=object, TypedExprNode=object)
from . import Builtin from . import Builtin
...@@ -16,7 +17,6 @@ from . import PyrexTypes ...@@ -16,7 +17,6 @@ from . import PyrexTypes
from .Visitor import TreeVisitor, CythonTransform from .Visitor import TreeVisitor, CythonTransform
from .Errors import error, warning, InternalError from .Errors import error, warning, InternalError
from .Optimize import ConstantFolding
class TypedExprNode(ExprNodes.ExprNode): class TypedExprNode(ExprNodes.ExprNode):
...@@ -676,6 +676,8 @@ class ControlFlowAnalysis(CythonTransform): ...@@ -676,6 +676,8 @@ class ControlFlowAnalysis(CythonTransform):
def visit_ModuleNode(self, node): def visit_ModuleNode(self, node):
dot_output = self.current_directives['control_flow.dot_output'] dot_output = self.current_directives['control_flow.dot_output']
self.gv_ctx = GVContext() if dot_output else None self.gv_ctx = GVContext() if dot_output else None
from .Optimize import ConstantFolding
self.constant_folder = ConstantFolding() self.constant_folder = ConstantFolding()
# Set of NameNode reductions # Set of NameNode reductions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment