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
a9b16e3b
Commit
a9b16e3b
authored
May 02, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove manual branch pruning
parent
b55b3b0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+3
-30
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
a9b16e3b
...
...
@@ -1887,36 +1887,9 @@ class ReplaceFusedTypeChecks(VisitorTransform):
from
Cython.Compiler
import
Optimize
self
.
visitchildren
(
node
)
if_clauses
=
[]
seen_true
=
False
seen_true_anywhere
=
False
for
if_clause
in
node
.
if_clauses
:
transform
=
Optimize
.
ConstantFolding
()
transform
.
check_constant_value_not_set
=
False
transform
(
if_clause
.
condition
)
is_const
=
if_clause
.
condition
.
has_constant_result
()
const
=
if_clause
.
condition
.
constant_result
if
is_const
:
if
const
and
not
seen_true
:
seen_true
=
True
seen_true_anywhere
=
True
if_clauses
.
append
(
if_clause
)
else
:
seen_true
=
False
if_clauses
.
append
(
if_clause
)
if
if_clauses
:
node
.
if_clauses
=
if_clauses
if
seen_true_anywhere
:
node
.
else_clause
=
None
else
:
node
=
node
.
else_clause
return
node
transform
=
Optimize
.
ConstantFolding
()
transform
.
check_constant_value_not_set
=
False
return
transform
(
node
)
def
visit_PrimaryCmpNode
(
self
,
node
):
type1
=
node
.
operand1
.
analyse_as_type
(
self
.
local_scope
)
...
...
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