declare some classes in FlowControl.py final to speed up internal method calls
authorStefan Behnel <stefan_ml@behnel.de>
Mon, 4 Feb 2013 17:54:37 +0000 (18:54 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Mon, 4 Feb 2013 17:54:37 +0000 (18:54 +0100)
Cython/Compiler/FlowControl.pxd

index 7cd1d17..ceb6955 100644 (file)
@@ -44,6 +44,7 @@ cdef class AssignmentList:
 cdef class AssignmentCollector(TreeVisitor):
     cdef list assignments
 
+@cython.final
 cdef class ControlFlow:
      cdef public set blocks
      cdef public set entries
@@ -86,6 +87,7 @@ cdef class Unknown:
 @cython.locals(dirty=bint, block=ControlBlock, parent=ControlBlock)
 cdef check_definitions(ControlFlow flow, dict compiler_directives)
 
+@cython.final
 cdef class ControlFlowAnalysis(CythonTransform):
     cdef object gv_ctx
     cdef set reductions