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
e48bc77a
Commit
e48bc77a
authored
Oct 08, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ticket #72, (compiler crash on bad code)
parent
5cb0fd35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+2
-2
No files found.
Cython/Compiler/Optimize.py
View file @
e48bc77a
...
...
@@ -39,12 +39,12 @@ class SwitchTransform(Visitor.VisitorTransform):
if
is_common_value
(
cond
.
operand1
,
cond
.
operand1
):
if
isinstance
(
cond
.
operand2
,
ExprNodes
.
ConstNode
):
return
cond
.
operand1
,
[
cond
.
operand2
]
elif
hasattr
(
cond
.
operand2
,
'entry'
)
and
cond
.
operand2
.
entry
.
is_const
:
elif
hasattr
(
cond
.
operand2
,
'entry'
)
and
cond
.
operand2
.
entry
and
cond
.
operand2
.
entry
.
is_const
:
return
cond
.
operand1
,
[
cond
.
operand2
]
if
is_common_value
(
cond
.
operand2
,
cond
.
operand2
):
if
isinstance
(
cond
.
operand1
,
ExprNodes
.
ConstNode
):
return
cond
.
operand2
,
[
cond
.
operand1
]
elif
hasattr
(
cond
.
operand1
,
'entry'
)
and
cond
.
operand1
.
entry
.
is_const
:
elif
hasattr
(
cond
.
operand1
,
'entry'
)
and
cond
.
operand1
.
entry
and
cond
.
operand1
.
entry
.
is_const
:
return
cond
.
operand2
,
[
cond
.
operand1
]
elif
(
isinstance
(
cond
,
ExprNodes
.
BoolBinopNode
)
and
cond
.
operator
==
'or'
):
...
...
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