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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5ab923e7
Commit
5ab923e7
authored
May 04, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DelStatNode hack
parent
67bf8435
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+5
-12
No files found.
Cython/Compiler/FlowControl.py
View file @
5ab923e7
...
...
@@ -610,22 +610,15 @@ class CreateControlFlowGraph(CythonTransform):
self
.
mark_assignment
(
node
.
lhs
,
node
.
create_binop_node
())
return
node
def
_delete_name_node
(
self
,
node
):
entry
=
node
.
entry
or
self
.
env
.
lookup
(
node
.
name
)
if
entry
.
in_closure
or
entry
.
from_closure
:
error
(
node
.
pos
,
"can not delete variable '%s' referenced in nested scope"
%
entry
.
name
)
# Mark reference
self
.
visit
(
node
)
self
.
flow
.
mark_deletion
(
node
,
entry
)
def
visit_DelStatNode
(
self
,
node
):
for
arg
in
node
.
args
:
if
arg
.
is_name
:
self
.
_delete_name_node
(
arg
)
elif
arg
.
is_sequence_constructor
:
self
.
visit_DelStatNode
(
arg
)
else
:
entry
=
arg
.
entry
or
self
.
env
.
lookup
(
arg
.
name
)
if
entry
.
in_closure
or
entry
.
from_closure
:
error
(
arg
.
pos
,
"can not delete variable '%s' referenced in nested scope"
%
entry
.
name
)
# Mark reference
self
.
visit
(
arg
)
self
.
flow
.
mark_deletion
(
arg
,
entry
)
return
node
def
visit_CArgDeclNode
(
self
,
node
):
...
...
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