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
cb2b3432
Commit
cb2b3432
authored
Feb 04, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slight code simplification
parent
f8409eec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
Cython/Compiler/FlowControl.pxd
Cython/Compiler/FlowControl.pxd
+1
-1
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+6
-7
No files found.
Cython/Compiler/FlowControl.pxd
View file @
cb2b3432
...
...
@@ -61,7 +61,7 @@ cdef class ControlFlow:
cpdef
mark_reference
(
self
,
node
,
entry
)
cpdef
normalize
(
self
)
@
cython
.
locals
(
offse
t
=
object
,
assmts
=
AssignmentList
,
@
cython
.
locals
(
bi
t
=
object
,
assmts
=
AssignmentList
,
block
=
ControlBlock
)
cpdef
initialize
(
self
)
...
...
Cython/Compiler/FlowControl.py
View file @
cb2b3432
...
...
@@ -222,22 +222,21 @@ class ControlFlow(object):
"""Set initial state, map assignments to bits."""
self
.
assmts
=
{}
offset
=
0
bit
=
1
for
entry
in
self
.
entries
:
assmts
=
AssignmentList
()
assmts
.
bit
=
1
<<
offset
assmts
.
mask
=
assmts
.
bit
assmts
.
mask
=
assmts
.
bit
=
bit
self
.
assmts
[
entry
]
=
assmts
offset
+
=
1
bit
<<
=
1
for
block
in
self
.
blocks
:
for
stat
in
block
.
stats
:
if
isinstance
(
stat
,
NameAssignment
):
stat
.
bit
=
1
<<
offse
t
stat
.
bit
=
bi
t
assmts
=
self
.
assmts
[
stat
.
entry
]
assmts
.
stats
.
append
(
stat
)
assmts
.
mask
|=
stat
.
bit
offset
+
=
1
assmts
.
mask
|=
bit
bit
<<
=
1
for
block
in
self
.
blocks
:
for
entry
,
stat
in
block
.
gen
.
items
():
...
...
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