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
Boxiang Sun
cython
Commits
84278a96
Commit
84278a96
authored
Jul 13, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure the bool-binop arguments are side-effect free when reusing them
parent
573b7931
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
84278a96
...
@@ -9753,10 +9753,13 @@ class BoolBinopResultNode(ExprNode):
...
@@ -9753,10 +9753,13 @@ class BoolBinopResultNode(ExprNode):
value
=
None
value
=
None
def
__init__
(
self
,
arg
,
result_type
,
env
):
def
__init__
(
self
,
arg
,
result_type
,
env
):
arg
=
ProxyNode
(
arg
)
# in case something wants to replace it later
# using 'arg' multiple times, so it must be a simple/temp value
arg
=
arg
.
coerce_to_simple
(
env
)
# wrap in ProxyNode, in case a transform wants to replace self.arg later
arg
=
ProxyNode
(
arg
)
super
(
BoolBinopResultNode
,
self
).
__init__
(
super
(
BoolBinopResultNode
,
self
).
__init__
(
arg
.
pos
,
arg
=
arg
,
type
=
result_type
,
arg
.
pos
,
arg
=
arg
,
type
=
result_type
,
value
=
CloneNode
(
arg
).
coerce_to
(
result_type
,
env
)
.
coerce_to_simple
(
env
)
)
value
=
CloneNode
(
arg
).
coerce_to
(
result_type
,
env
))
def
coerce_to_boolean
(
self
,
env
):
def
coerce_to_boolean
(
self
,
env
):
# coercing to simple boolean case after being instantiated => replace by simple coerced result
# coercing to simple boolean case after being instantiated => replace by simple coerced result
...
...
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