Commit a9f694f1 authored by Stefan Behnel's avatar Stefan Behnel

Optimise some transforms a little more.

parent 7af5d3e9
...@@ -48,6 +48,7 @@ cdef class AlignFunctionDefinitions(CythonTransform): ...@@ -48,6 +48,7 @@ cdef class AlignFunctionDefinitions(CythonTransform):
cdef dict directives cdef dict directives
cdef scope cdef scope
@cython.final
cdef class YieldNodeCollector(TreeVisitor): cdef class YieldNodeCollector(TreeVisitor):
cdef public list yields cdef public list yields
cdef public list returns cdef public list returns
...@@ -56,15 +57,20 @@ cdef class YieldNodeCollector(TreeVisitor): ...@@ -56,15 +57,20 @@ cdef class YieldNodeCollector(TreeVisitor):
cdef public bint has_yield cdef public bint has_yield
cdef public bint has_await cdef public bint has_await
@cython.final
cdef class MarkClosureVisitor(CythonTransform): cdef class MarkClosureVisitor(CythonTransform):
cdef bint needs_closure cdef bint needs_closure
@cython.final
cdef class CreateClosureClasses(CythonTransform): cdef class CreateClosureClasses(CythonTransform):
cdef list path cdef list path
cdef bint in_lambda cdef bint in_lambda
cdef module_scope cdef module_scope
cdef generator_class cdef generator_class
cdef create_class_from_scope(self, node, target_module_scope, inner_node=*)
cdef find_entries_used_in_closures(self, node)
cdef class GilCheck(VisitorTransform): cdef class GilCheck(VisitorTransform):
cdef list env_stack cdef list env_stack
cdef bint nogil cdef bint nogil
......
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