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
Kirill Smelkov
cython
Commits
8710e415
Commit
8710e415
authored
Sep 15, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
undo CloneNode wrapping of the self-object when optimising method calls
parent
6bff7773
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+4
-0
No files found.
Cython/Compiler/Optimize.py
View file @
8710e415
...
@@ -4213,6 +4213,10 @@ class FinalOptimizePhase(Visitor.CythonTransform, Visitor.NodeRefCleanupMixin):
...
@@ -4213,6 +4213,10 @@ class FinalOptimizePhase(Visitor.CythonTransform, Visitor.NodeRefCleanupMixin):
assignment
.
rhs
and
not
isinstance
(
assignment
.
rhs
,
non_method_nodes
)
assignment
.
rhs
and
not
isinstance
(
assignment
.
rhs
,
non_method_nodes
)
for
assignment
in
entry
.
cf_assignments
)
for
assignment
in
entry
.
cf_assignments
)
if
may_be_a_method
:
if
may_be_a_method
:
if
(
node
.
self
and
function
.
is_attribute
and
isinstance
(
function
.
obj
,
ExprNodes
.
CloneNode
)
and
function
.
obj
.
arg
is
node
.
self
):
# function self object was moved into a CloneNode => undo
function
.
obj
=
function
.
obj
.
arg
node
=
self
.
replace
(
node
,
ExprNodes
.
PyMethodCallNode
.
from_node
(
node
=
self
.
replace
(
node
,
ExprNodes
.
PyMethodCallNode
.
from_node
(
node
,
function
=
function
,
arg_tuple
=
node
.
arg_tuple
,
type
=
node
.
type
))
node
,
function
=
function
,
arg_tuple
=
node
.
arg_tuple
,
type
=
node
.
type
))
return
node
return
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