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
778550c9
Commit
778550c9
authored
Nov 06, 2020
by
Xavier Thompson
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent nested lock acquisition in operations and function calls
parent
98c42d7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
Cython/Compiler/CypclassTransforms.py
Cython/Compiler/CypclassTransforms.py
+21
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
No files found.
Cython/Compiler/CypclassTransforms.py
View file @
778550c9
...
...
@@ -512,6 +512,27 @@ class CypclassLockTransform(Visitor.EnvTransform):
node
.
base
=
self
.
visit
(
node
.
base
)
return
node
def
visit_SimpleCallNode
(
self
,
node
):
if
node
.
type
.
is_error
:
return
node
for
i
,
arg
in
enumerate
(
node
.
args
or
()):
node
.
args
[
i
]
=
self
.
visit_value
(
arg
)
self
.
visitchildren
(
node
,
exclude
=
[
'args'
])
return
node
# Todo: other kinds of method calls
def
visit_BinopNode
(
self
,
node
):
node
.
operand1
=
self
.
visit_value
(
node
.
operand1
)
node
.
operand2
=
self
.
visit_value
(
node
.
operand2
)
return
node
def
visit_UnopNode
(
self
,
node
):
node
.
operand
=
self
.
visit_value
(
node
.
operand
)
return
node
# Todo: other kinds of operations (comparisons, ...)
def
visit_DelStatNode
(
self
,
node
):
for
arg
in
node
.
args
:
arg_entry
=
self
.
id
(
arg
)
...
...
Cython/Compiler/ExprNodes.py
View file @
778550c9
...
...
@@ -5935,7 +5935,8 @@ class SimpleCallNode(CallNode):
# explicit_cpp_self bool used internally
# needs_deref bool used internally
subexprs
=
[
'self'
,
'coerced_self'
,
'function'
,
'args'
,
'arg_tuple'
]
# evaluate arguments first.
subexprs
=
[
'self'
,
'coerced_self'
,
'args'
,
'arg_tuple'
,
'function'
]
self
=
None
coerced_self
=
None
...
...
Xavier Thompson
@xavier_thompson
mentioned in commit
91dfd344
·
Nov 09, 2020
mentioned in commit
91dfd344
mentioned in commit 91dfd344f0224fe204264da8aab65396d7960b37
Toggle commit list
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