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
ec9e1b3c
Commit
ec9e1b3c
authored
Oct 03, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compiler crash on none checks after in-place operations
parent
c7c062c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+3
-1
tests/run/cf_none.pyx
tests/run/cf_none.pyx
+7
-0
No files found.
Cython/Compiler/FlowControl.py
View file @
ec9e1b3c
...
@@ -711,7 +711,9 @@ class CreateControlFlowGraph(CythonTransform):
...
@@ -711,7 +711,9 @@ class CreateControlFlowGraph(CythonTransform):
self
.
in_inplace_assignment
=
True
self
.
in_inplace_assignment
=
True
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
self
.
in_inplace_assignment
=
False
self
.
in_inplace_assignment
=
False
self
.
mark_assignment
(
node
.
lhs
,
node
.
create_binop_node
())
expr_node
=
node
.
create_binop_node
()
expr_node
.
type
=
expr_node
.
infer_type
(
self
.
env
)
self
.
mark_assignment
(
node
.
lhs
,
expr_node
)
return
node
return
node
def
visit_DelStatNode
(
self
,
node
):
def
visit_DelStatNode
(
self
,
node
):
...
...
tests/run/cf_none.pyx
View file @
ec9e1b3c
...
@@ -113,3 +113,10 @@ def self_dependency_none(int x):
...
@@ -113,3 +113,10 @@ def self_dependency_none(int x):
if
x
:
if
x
:
a
,
b
=
b
,
a
a
,
b
=
b
,
a
return
b
.
get
(
2
)
return
b
.
get
(
2
)
#@cython.test_fail_if_path_exists('//NoneCheckNode')
def
in_place_op
():
vals
=
[
0
]
vals
+=
[
1
]
for
x
in
vals
:
pass
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