Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / cython / src / Cython / Compiler / FlowControl.pxd
blobfa47853db9ddc850b11a21dd9ab39bb50c00298b
1 cimport cython
3 from Cython.Compiler.Visitor cimport CythonTransform, TreeVisitor
5 cdef class ControlBlock:
6      cdef public set children
7      cdef public set parents
8      cdef public set positions
9      cdef public list stats
10      cdef public dict gen
11      cdef public set bounded
12      cdef public dict input
13      cdef public dict output
15      # Big integer it bitsets
16      cdef public object i_input
17      cdef public object i_output
18      cdef public object i_gen
19      cdef public object i_kill
20      cdef public object i_state
22      cpdef bint empty(self)
23      cpdef detach(self)
24      cpdef add_child(self, block)
26 cdef class ExitBlock(ControlBlock):
27      cpdef bint empty(self)
29 cdef class NameAssignment:
30     cdef public bint is_arg
31     cdef public bint is_deletion
32     cdef public object lhs
33     cdef public object rhs
34     cdef public object entry
35     cdef public object pos
36     cdef public set refs
37     cdef public object bit
38     cdef public object inferred_type
40 cdef class AssignmentList:
41     cdef public object bit
42     cdef public object mask
43     cdef public list stats
45 cdef class AssignmentCollector(TreeVisitor):
46     cdef list assignments
48 @cython.final
49 cdef class ControlFlow:
50      cdef public set blocks
51      cdef public set entries
52      cdef public list loops
53      cdef public list exceptions
55      cdef public ControlBlock entry_point
56      cdef public ExitBlock exit_point
57      cdef public ControlBlock block
59      cdef public dict assmts
61      cpdef newblock(self, ControlBlock parent=*)
62      cpdef nextblock(self, ControlBlock parent=*)
63      cpdef bint is_tracked(self, entry)
64      cpdef bint is_statically_assigned(self, entry)
65      cpdef mark_position(self, node)
66      cpdef mark_assignment(self, lhs, rhs, entry)
67      cpdef mark_argument(self, lhs, rhs, entry)
68      cpdef mark_deletion(self, node, entry)
69      cpdef mark_reference(self, node, entry)
71      @cython.locals(block=ControlBlock, parent=ControlBlock, unreachable=set)
72      cpdef normalize(self)
74      @cython.locals(bit=object, assmts=AssignmentList,
75                     block=ControlBlock)
76      cpdef initialize(self)
78      @cython.locals(assmts=AssignmentList, assmt=NameAssignment)
79      cpdef set map_one(self, istate, entry)
81      @cython.locals(block=ControlBlock, parent=ControlBlock)
82      cdef reaching_definitions(self)
84 cdef class Uninitialized:
85      pass
87 cdef class Unknown:
88     pass
90 @cython.locals(dirty=bint, block=ControlBlock, parent=ControlBlock,
91                assmt=NameAssignment)
92 cdef check_definitions(ControlFlow flow, dict compiler_directives)
94 @cython.final
95 cdef class ControlFlowAnalysis(CythonTransform):
96     cdef object gv_ctx
97     cdef set reductions
98     cdef list env_stack
99     cdef list stack
100     cdef object env
101     cdef ControlFlow flow
102     cdef bint in_inplace_assignment
104     cpdef mark_assignment(self, lhs, rhs=*)
105     cpdef mark_position(self, node)