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
Kirill Smelkov
cython
Commits
4cb7c99f
Commit
4cb7c99f
authored
Jan 03, 2022
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid unnecessary directives tracking in the WithTransform since it does not need it.
parent
db787a45
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
Cython/Compiler/ParseTreeTransforms.pxd
Cython/Compiler/ParseTreeTransforms.pxd
+1
-1
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+3
-1
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+1
-1
No files found.
Cython/Compiler/ParseTreeTransforms.pxd
View file @
4cb7c99f
...
...
@@ -29,7 +29,7 @@ cdef map_starred_assignment(list lhs_targets, list starred_assignments, list lhs
#class PxdPostParse(CythonTransform, SkipDeclarations):
#class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
#class WithTransform(
Cython
Transform, SkipDeclarations):
#class WithTransform(
Visitor
Transform, SkipDeclarations):
#class DecoratorTransform(CythonTransform, SkipDeclarations):
#class AnalyseDeclarationsTransform(EnvTransform):
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
4cb7c99f
...
...
@@ -1342,7 +1342,7 @@ class ParallelRangeTransform(CythonTransform, SkipDeclarations):
return
super
(
ParallelRangeTransform
,
self
).
visit
(
node
)
class
WithTransform
(
Cython
Transform
,
SkipDeclarations
):
class
WithTransform
(
Visitor
Transform
,
SkipDeclarations
):
def
visit_WithStatNode
(
self
,
node
):
self
.
visitchildren
(
node
,
'body'
)
pos
=
node
.
pos
...
...
@@ -1408,6 +1408,8 @@ class WithTransform(CythonTransform, SkipDeclarations):
# With statements are never inside expressions.
return
node
visit_Node
=
VisitorTransform
.
recurse_to_children
class
DecoratorTransform
(
ScopeTrackingTransform
,
SkipDeclarations
):
"""
...
...
Cython/Compiler/Pipeline.py
View file @
4cb7c99f
...
...
@@ -186,7 +186,7 @@ def create_pipeline(context, mode, exclude_classes=()):
TrackNumpyAttributes
(),
InterpretCompilerDirectives
(
context
,
context
.
compiler_directives
),
ParallelRangeTransform
(
context
),
WithTransform
(
context
),
WithTransform
(),
AdjustDefByDirectives
(
context
),
_align_function_definitions
,
MarkClosureVisitor
(
context
),
...
...
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