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
5a11f500
Commit
5a11f500
authored
Nov 12, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop redundant code in ExpandInplaceOperators transform
parent
b8e2b990
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-15
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
5a11f500
...
...
@@ -1195,17 +1195,7 @@ class AnalyseExpressionsTransform(CythonTransform):
self
.
visitchildren
(
node
)
return
node
class
ExpandInplaceOperators
(
CythonTransform
):
def
__call__
(
self
,
root
):
self
.
env_stack
=
[
root
.
scope
]
return
super
(
ExpandInplaceOperators
,
self
).
__call__
(
root
)
def
visit_FuncDefNode
(
self
,
node
):
self
.
env_stack
.
append
(
node
.
local_scope
)
self
.
visitchildren
(
node
)
self
.
env_stack
.
pop
()
return
node
class
ExpandInplaceOperators
(
EnvTransform
):
def
visit_InPlaceAssignmentNode
(
self
,
node
):
lhs
=
node
.
lhs
...
...
@@ -1250,16 +1240,13 @@ class ExpandInplaceOperators(CythonTransform):
let_ref_nodes
.
reverse
()
for
t
in
let_ref_nodes
:
node
=
LetNode
(
t
,
node
)
node
.
analyse_expressions
(
self
.
env_stack
[
-
1
]
)
node
.
analyse_expressions
(
self
.
current_env
()
)
return
node
def
visit_ExprNode
(
self
,
node
):
# In-place assignments can't happen within an expression.
return
node
def
visit_Node
(
self
,
node
):
self
.
visitchildren
(
node
)
return
node
class
AlignFunctionDefinitions
(
CythonTransform
):
"""
...
...
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