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
37eea7a5
Commit
37eea7a5
authored
Sep 26, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make overly complicated code logic in boolean and/or handling code understandable again
parent
24322dc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-8
No files found.
Cython/Compiler/ExprNodes.py
View file @
37eea7a5
...
...
@@ -10045,20 +10045,19 @@ class BoolBinopResultNode(ExprNode):
code
.
funcstate
.
release_temp
(
test_result
)
self
.
arg
.
generate_disposal_code
(
code
)
if
or_label
:
if
or_label
and
or_label
!=
fall_through
:
# value is false => short-circuit to next 'or'
if
or_label
!=
fall_through
:
code
.
put_goto
(
or_label
)
code
.
putln
(
"} else {"
)
if
and_label
:
code
.
put_goto
(
or_label
)
if
and_label
and
and_label
!=
fall_through
:
# value is true => go to next 'and'
if
and_label
!=
fall_through
:
code
.
put_goto
(
and_label
)
if
not
or_label
:
if
or_label
:
code
.
putln
(
"} else {"
)
code
.
put_goto
(
and_label
)
if
not
and_label
or
not
or_label
:
# if no next 'and' or 'or', we provide the result
if
and_label
or
or_label
:
code
.
putln
(
"} else {"
)
self
.
value
.
generate_evaluation_code
(
code
)
self
.
value
.
make_owned_reference
(
code
)
code
.
putln
(
"%s = %s;"
%
(
final_result_temp
,
self
.
value
.
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