Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
daf7dcec
Commit
daf7dcec
authored
Feb 04, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up and improve static type declarations in FlowControl.py a bit
parent
cb2b3432
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
49 deletions
+71
-49
Cython/Compiler/FlowControl.pxd
Cython/Compiler/FlowControl.pxd
+23
-2
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+48
-47
No files found.
Cython/Compiler/FlowControl.pxd
View file @
daf7dcec
cimport
cython
cimport
cython
from
Cython.Compiler.Visitor
cimport
CythonTransform
,
TreeVisitor
cdef
class
ControlBlock
:
cdef
class
ControlBlock
:
cdef
public
set
children
cdef
public
set
children
cdef
public
set
parents
cdef
public
set
parents
...
@@ -39,6 +41,9 @@ cdef class AssignmentList:
...
@@ -39,6 +41,9 @@ cdef class AssignmentList:
cdef
public
object
mask
cdef
public
object
mask
cdef
public
list
stats
cdef
public
list
stats
cdef
class
AssignmentCollector
(
TreeVisitor
):
cdef
list
assignments
cdef
class
ControlFlow
:
cdef
class
ControlFlow
:
cdef
public
set
blocks
cdef
public
set
blocks
cdef
public
set
entries
cdef
public
set
entries
...
@@ -51,9 +56,10 @@ cdef class ControlFlow:
...
@@ -51,9 +56,10 @@ cdef class ControlFlow:
cdef
public
dict
assmts
cdef
public
dict
assmts
cpdef
newblock
(
self
,
parent
=*
)
cpdef
newblock
(
self
,
ControlBlock
parent
=*
)
cpdef
nextblock
(
self
,
parent
=*
)
cpdef
nextblock
(
self
,
ControlBlock
parent
=*
)
cpdef
bint
is_tracked
(
self
,
entry
)
cpdef
bint
is_tracked
(
self
,
entry
)
cpdef
bint
is_statically_assigned
(
self
,
entry
)
cpdef
mark_position
(
self
,
node
)
cpdef
mark_position
(
self
,
node
)
cpdef
mark_assignment
(
self
,
lhs
,
rhs
,
entry
)
cpdef
mark_assignment
(
self
,
lhs
,
rhs
,
entry
)
cpdef
mark_argument
(
self
,
lhs
,
rhs
,
entry
)
cpdef
mark_argument
(
self
,
lhs
,
rhs
,
entry
)
...
@@ -74,5 +80,20 @@ cdef class ControlFlow:
...
@@ -74,5 +80,20 @@ cdef class ControlFlow:
cdef
class
Uninitialized
:
cdef
class
Uninitialized
:
pass
pass
cdef
class
Unknown
:
pass
@
cython
.
locals
(
dirty
=
bint
,
block
=
ControlBlock
,
parent
=
ControlBlock
)
@
cython
.
locals
(
dirty
=
bint
,
block
=
ControlBlock
,
parent
=
ControlBlock
)
cdef
check_definitions
(
ControlFlow
flow
,
dict
compiler_directives
)
cdef
check_definitions
(
ControlFlow
flow
,
dict
compiler_directives
)
cdef
class
ControlFlowAnalysis
(
CythonTransform
):
cdef
object
gv_ctx
cdef
set
reductions
cdef
list
env_stack
cdef
list
stack
cdef
object
env
cdef
ControlFlow
flow
cdef
bint
in_inplace_assignment
cpdef
mark_assignment
(
self
,
lhs
,
rhs
=*
)
cpdef
mark_position
(
self
,
node
)
Cython/Compiler/FlowControl.py
View file @
daf7dcec
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment