Commit 7499c3d4 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Pruning cdef variable declarations after analysis

parent 050a5310
...@@ -272,6 +272,13 @@ class AnalyseDeclarationsTransform(CythonTransform): ...@@ -272,6 +272,13 @@ class AnalyseDeclarationsTransform(CythonTransform):
self.env_stack.pop() self.env_stack.pop()
return node return node
# Some nodes are no longer needed after declaration
# analysis and can be dropped. The analysis was performed
# on these nodes in a seperate recursive process from the
# enclosing function or module, so we can simply drop them.
def visit_CVarDefNode(self, node):
return None
class AnalyseExpressionsTransform(CythonTransform): class AnalyseExpressionsTransform(CythonTransform):
def visit_ModuleNode(self, node): def visit_ModuleNode(self, node):
node.body.analyse_expressions(node.scope) node.body.analyse_expressions(node.scope)
......
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