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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
6d88e945
Commit
6d88e945
authored
Dec 14, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actually, drop the comments, they don't tell much anyway
parent
477d7def
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+12
-17
No files found.
Cython/Compiler/ExprNodes.py
View file @
6d88e945
...
@@ -5007,15 +5007,12 @@ class YieldExprNode(ExprNode):
...
@@ -5007,15 +5007,12 @@ class YieldExprNode(ExprNode):
code
.
put_init_to_py_none
(
Naming
.
retval_cname
,
py_object_type
)
code
.
put_init_to_py_none
(
Naming
.
retval_cname
,
py_object_type
)
saved
=
[]
saved
=
[]
code
.
temp_allocator
.
reset
()
code
.
temp_allocator
.
reset
()
temps_in_use
=
code
.
funcstate
.
temps_in_use
()
for
cname
,
type
,
manage_ref
in
code
.
funcstate
.
temps_in_use
():
if
temps_in_use
:
save_cname
=
code
.
temp_allocator
.
allocate_temp
(
type
)
code
.
putln
(
'/* Save temporary variables */'
)
saved
.
append
((
cname
,
save_cname
,
type
))
for
cname
,
type
,
manage_ref
in
temps_in_use
:
if
type
.
is_pyobject
:
save_cname
=
code
.
temp_allocator
.
allocate_temp
(
type
)
code
.
put_xgiveref
(
cname
)
saved
.
append
((
cname
,
save_cname
,
type
))
code
.
putln
(
'%s->%s = %s;'
%
(
Naming
.
cur_scope_cname
,
save_cname
,
cname
))
if
type
.
is_pyobject
:
code
.
put_xgiveref
(
cname
)
code
.
putln
(
'%s->%s = %s;'
%
(
Naming
.
cur_scope_cname
,
save_cname
,
cname
))
code
.
put_xgiveref
(
Naming
.
retval_cname
)
code
.
put_xgiveref
(
Naming
.
retval_cname
)
code
.
put_finish_refcount_context
()
code
.
put_finish_refcount_context
()
...
@@ -5023,14 +5020,12 @@ class YieldExprNode(ExprNode):
...
@@ -5023,14 +5020,12 @@ class YieldExprNode(ExprNode):
code
.
putln
(
"%s->%s.resume_label = %d;"
%
(
Naming
.
cur_scope_cname
,
Naming
.
obj_base_cname
,
self
.
label_num
))
code
.
putln
(
"%s->%s.resume_label = %d;"
%
(
Naming
.
cur_scope_cname
,
Naming
.
obj_base_cname
,
self
.
label_num
))
code
.
putln
(
"return %s;"
%
Naming
.
retval_cname
);
code
.
putln
(
"return %s;"
%
Naming
.
retval_cname
);
code
.
put_label
(
self
.
label_name
)
code
.
put_label
(
self
.
label_name
)
if
saved
:
for
cname
,
save_cname
,
type
in
saved
:
code
.
putln
(
'/* Restore temporary variables */'
)
code
.
putln
(
'%s = %s->%s;'
%
(
cname
,
Naming
.
cur_scope_cname
,
save_cname
))
for
cname
,
save_cname
,
type
in
saved
:
if
type
.
is_pyobject
:
code
.
putln
(
'%s = %s->%s;'
%
(
cname
,
Naming
.
cur_scope_cname
,
save_cname
))
code
.
putln
(
'%s->%s = 0;'
%
(
Naming
.
cur_scope_cname
,
save_cname
))
if
type
.
is_pyobject
:
if
type
.
is_pyobject
:
code
.
putln
(
'%s->%s = 0;'
%
(
Naming
.
cur_scope_cname
,
save_cname
))
code
.
put_xgotref
(
cname
)
if
type
.
is_pyobject
:
code
.
put_xgotref
(
cname
)
if
self
.
result_is_used
:
if
self
.
result_is_used
:
self
.
allocate_temp_result
(
code
)
self
.
allocate_temp_result
(
code
)
code
.
putln
(
'%s = %s; %s'
%
code
.
putln
(
'%s = %s; %s'
%
...
...
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