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
Gwenaël Samain
cython
Commits
d9196f9a
Commit
d9196f9a
authored
Oct 07, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.27.x'
parents
35ae99b6
c90f1d84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+12
-12
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
d9196f9a
...
...
@@ -2867,18 +2867,18 @@ class WithExitCallNode(ExprNode):
# The __exit__() call of a 'with' statement. Used in both the
# except and finally clauses.
# with_stat WithStatNode the surrounding 'with' statement
# args TupleNode or ResultStatNode the exception info tuple
# await
AwaitExprNode the await expression of an 'async with' statement
# with_stat
WithStatNode the surrounding 'with' statement
# args
TupleNode or ResultStatNode the exception info tuple
# await
_expr
AwaitExprNode the await expression of an 'async with' statement
subexprs
=
[
'args'
,
'await'
]
subexprs
=
[
'args'
,
'await
_expr
'
]
test_if_run
=
True
await
=
None
await
_expr
=
None
def
analyse_types
(
self
,
env
):
self
.
args
=
self
.
args
.
analyse_types
(
env
)
if
self
.
await
:
self
.
await
=
self
.
await
.
analyse_types
(
env
)
if
self
.
await
_expr
:
self
.
await
_expr
=
self
.
await_expr
.
analyse_types
(
env
)
self
.
type
=
PyrexTypes
.
c_bint_type
self
.
is_temp
=
True
return
self
...
...
@@ -2905,12 +2905,12 @@ class WithExitCallNode(ExprNode):
code
.
putln
(
code
.
error_goto_if_null
(
result_var
,
self
.
pos
))
code
.
put_gotref
(
result_var
)
if
self
.
await
:
if
self
.
await
_expr
:
# FIXME: result_var temp currently leaks into the closure
self
.
await
.
generate_evaluation_code
(
code
,
source_cname
=
result_var
,
decref_source
=
True
)
code
.
putln
(
"%s = %s;"
%
(
result_var
,
self
.
await
.
py_result
()))
self
.
await
.
generate_post_assignment_code
(
code
)
self
.
await
.
free_temps
(
code
)
self
.
await
_expr
.
generate_evaluation_code
(
code
,
source_cname
=
result_var
,
decref_source
=
True
)
code
.
putln
(
"%s = %s;"
%
(
result_var
,
self
.
await
_expr
.
py_result
()))
self
.
await
_expr
.
generate_post_assignment_code
(
code
)
self
.
await
_expr
.
free_temps
(
code
)
if
self
.
result_is_used
:
self
.
allocate_temp_result
(
code
)
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
d9196f9a
...
...
@@ -1292,7 +1292,7 @@ class WithTransform(CythonTransform, SkipDeclarations):
pos
,
with_stat
=
node
,
test_if_run
=
False
,
args
=
excinfo_target
,
await
=
ExprNodes
.
AwaitExprNode
(
pos
,
arg
=
None
)
if
is_async
else
None
)),
await
_expr
=
ExprNodes
.
AwaitExprNode
(
pos
,
arg
=
None
)
if
is_async
else
None
)),
body
=
Nodes
.
ReraiseStatNode
(
pos
),
),
],
...
...
@@ -1314,7 +1314,7 @@ class WithTransform(CythonTransform, SkipDeclarations):
test_if_run
=
True
,
args
=
ExprNodes
.
TupleNode
(
pos
,
args
=
[
ExprNodes
.
NoneNode
(
pos
)
for
_
in
range
(
3
)]),
await
=
ExprNodes
.
AwaitExprNode
(
pos
,
arg
=
None
)
if
is_async
else
None
)),
await
_expr
=
ExprNodes
.
AwaitExprNode
(
pos
,
arg
=
None
)
if
is_async
else
None
)),
handle_error_case
=
False
,
)
return
node
...
...
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