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
e82f5b5c
Commit
e82f5b5c
authored
Sep 11, 2007
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Type check after (not before) operation on inplace assignment.
parent
4eb283b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+5
-2
No files found.
Cython/Compiler/Nodes.py
View file @
e82f5b5c
...
...
@@ -1629,10 +1629,12 @@ class InPlaceAssignmentNode(AssignmentNode):
def
allocate_rhs_temps
(
self
,
env
):
import
ExprNodes
if
self
.
lhs
.
type
.
is_pyobject
or
self
.
rhs
.
type
.
is_pyobject
:
if
self
.
lhs
.
type
.
is_pyobject
:
self
.
rhs
=
self
.
rhs
.
coerce_to_pyobject
(
env
)
elif
self
.
rhs
.
type
.
is_pyobject
:
self
.
rhs
=
self
.
rhs
.
coerce_to
(
self
.
lhs
.
type
,
env
)
if
self
.
lhs
.
type
.
is_pyobject
:
self
.
result
=
ExprNodes
.
PyTempNode
(
self
.
pos
,
env
)
self
.
result
=
ExprNodes
.
PyTempNode
(
self
.
pos
,
env
)
.
coerce_to
(
self
.
lhs
.
type
,
env
)
self
.
result
.
allocate_temps
(
env
)
# if use_temp:
# self.rhs = self.rhs.coerce_to_temp(env)
...
...
@@ -1662,6 +1664,7 @@ class InPlaceAssignmentNode(AssignmentNode):
self
.
dup
.
py_result
(),
self
.
rhs
.
py_result
(),
code
.
error_goto_if_null
(
self
.
result
.
py_result
(),
self
.
pos
)))
self
.
result
.
generate_evaluation_code
(
code
)
# May be a type check...
self
.
rhs
.
generate_disposal_code
(
code
)
self
.
dup
.
generate_disposal_code
(
code
)
self
.
lhs
.
generate_assignment_code
(
self
.
result
,
code
)
...
...
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