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
e090be97
Commit
e090be97
authored
May 08, 2012
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename MarkAssignments to MarkParallelAssignments
parent
cf89a114
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Cython/Compiler/Pipeline.py
Cython/Compiler/Pipeline.py
+3
-3
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+6
-2
No files found.
Cython/Compiler/Pipeline.py
View file @
e090be97
...
...
@@ -129,7 +129,7 @@ def create_pipeline(context, mode, exclude_classes=()):
from
ParseTreeTransforms
import
CreateClosureClasses
,
MarkClosureVisitor
,
DecoratorTransform
from
ParseTreeTransforms
import
InterpretCompilerDirectives
,
TransformBuiltinMethods
from
ParseTreeTransforms
import
ExpandInplaceOperators
,
ParallelRangeTransform
from
TypeInference
import
MarkAssignments
,
MarkOverflowingArithmetic
from
TypeInference
import
Mark
Parallel
Assignments
,
MarkOverflowingArithmetic
from
ParseTreeTransforms
import
AdjustDefByDirectives
,
AlignFunctionDefinitions
from
ParseTreeTransforms
import
RemoveUnreachableCode
,
GilCheck
from
FlowControl
import
ControlFlowAnalysis
...
...
@@ -179,10 +179,10 @@ def create_pipeline(context, mode, exclude_classes=()):
EmbedSignature
(
context
),
EarlyReplaceBuiltinCalls
(
context
),
## Necessary?
TransformBuiltinMethods
(
context
),
## Necessary?
MarkAssignments
(
context
),
Mark
Parallel
Assignments
(
context
),
ControlFlowAnalysis
(
context
),
RemoveUnreachableCode
(
context
),
# MarkAssignments(context),
# Mark
Parallel
Assignments(context),
MarkOverflowingArithmetic
(
context
),
IntroduceBufferAuxiliaryVars
(
context
),
_check_c_declarations
,
...
...
Cython/Compiler/TypeInference.py
View file @
e090be97
...
...
@@ -15,7 +15,11 @@ class TypedExprNode(ExprNodes.ExprNode):
object_expr
=
TypedExprNode
(
py_object_type
)
class
MarkAssignments
(
EnvTransform
):
class
MarkParallelAssignments
(
EnvTransform
):
# Collects assignments inside parallel blocks prange, with parallel.
# Perhaps it's better to move it to ControlFlowAnalysis.
# tells us whether we're in a normal loop
in_loop
=
False
...
...
@@ -24,7 +28,7 @@ class MarkAssignments(EnvTransform):
def
__init__
(
self
,
context
):
# Track the parallel block scopes (with parallel, for i in prange())
self
.
parallel_block_stack
=
[]
return
super
(
MarkAssignments
,
self
).
__init__
(
context
)
return
super
(
Mark
Parallel
Assignments
,
self
).
__init__
(
context
)
def
mark_assignment
(
self
,
lhs
,
rhs
,
inplace_op
=
None
):
if
isinstance
(
lhs
,
(
ExprNodes
.
NameNode
,
Nodes
.
PyArgDeclNode
)):
...
...
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