Commit 4cb7c99f authored by Stefan Behnel's avatar Stefan Behnel

Avoid unnecessary directives tracking in the WithTransform since it does not need it.

parent db787a45
......@@ -29,7 +29,7 @@ cdef map_starred_assignment(list lhs_targets, list starred_assignments, list lhs
#class PxdPostParse(CythonTransform, SkipDeclarations):
#class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
#class WithTransform(CythonTransform, SkipDeclarations):
#class WithTransform(VisitorTransform, SkipDeclarations):
#class DecoratorTransform(CythonTransform, SkipDeclarations):
#class AnalyseDeclarationsTransform(EnvTransform):
......
......@@ -1342,7 +1342,7 @@ class ParallelRangeTransform(CythonTransform, SkipDeclarations):
return super(ParallelRangeTransform, self).visit(node)
class WithTransform(CythonTransform, SkipDeclarations):
class WithTransform(VisitorTransform, SkipDeclarations):
def visit_WithStatNode(self, node):
self.visitchildren(node, 'body')
pos = node.pos
......@@ -1408,6 +1408,8 @@ class WithTransform(CythonTransform, SkipDeclarations):
# With statements are never inside expressions.
return node
visit_Node = VisitorTransform.recurse_to_children
class DecoratorTransform(ScopeTrackingTransform, SkipDeclarations):
"""
......
......@@ -186,7 +186,7 @@ def create_pipeline(context, mode, exclude_classes=()):
TrackNumpyAttributes(),
InterpretCompilerDirectives(context, context.compiler_directives),
ParallelRangeTransform(context),
WithTransform(context),
WithTransform(),
AdjustDefByDirectives(context),
_align_function_definitions,
MarkClosureVisitor(context),
......
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