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
0cccf2ab
Commit
0cccf2ab
authored
Nov 08, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up some code and generate LetRefNodes in expected order for assignment unrolling
parent
185af334
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-7
No files found.
Cython/Compiler/Nodes.py
View file @
0cccf2ab
...
@@ -4773,7 +4773,7 @@ class SingleAssignmentNode(AssignmentNode):
...
@@ -4773,7 +4773,7 @@ class SingleAssignmentNode(AssignmentNode):
"fused_type does not take keyword arguments"
)
"fused_type does not take keyword arguments"
)
fusednode
=
FusedTypeNode
(
self
.
rhs
.
pos
,
fusednode
=
FusedTypeNode
(
self
.
rhs
.
pos
,
name
=
self
.
lhs
.
name
,
types
=
args
)
name
=
self
.
lhs
.
name
,
types
=
args
)
fusednode
.
analyse_declarations
(
env
)
fusednode
.
analyse_declarations
(
env
)
if
self
.
declaration_only
:
if
self
.
declaration_only
:
...
@@ -4781,8 +4781,8 @@ class SingleAssignmentNode(AssignmentNode):
...
@@ -4781,8 +4781,8 @@ class SingleAssignmentNode(AssignmentNode):
else
:
else
:
self
.
lhs
.
analyse_target_declaration
(
env
)
self
.
lhs
.
analyse_target_declaration
(
env
)
def
analyse_types
(
self
,
env
,
use_temp
=
0
):
def
analyse_types
(
self
,
env
,
use_temp
=
0
):
from
.
import
ExprNodes
,
UtilNodes
from
.
import
ExprNodes
self
.
rhs
=
self
.
rhs
.
analyse_types
(
env
)
self
.
rhs
=
self
.
rhs
.
analyse_types
(
env
)
...
@@ -4927,7 +4927,7 @@ class SingleAssignmentNode(AssignmentNode):
...
@@ -4927,7 +4927,7 @@ class SingleAssignmentNode(AssignmentNode):
all
=
ParallelAssignmentNode
(
pos
=
self
.
pos
,
stats
=
assignments
).
analyse_expressions
(
env
)
all
=
ParallelAssignmentNode
(
pos
=
self
.
pos
,
stats
=
assignments
).
analyse_expressions
(
env
)
if
check_node
:
if
check_node
:
all
=
StatListNode
(
pos
=
self
.
pos
,
stats
=
[
check_node
,
all
])
all
=
StatListNode
(
pos
=
self
.
pos
,
stats
=
[
check_node
,
all
])
for
ref
in
refs
:
for
ref
in
refs
[::
-
1
]
:
all
=
UtilNodes
.
LetNode
(
ref
,
all
)
all
=
UtilNodes
.
LetNode
(
ref
,
all
)
return
all
return
all
...
@@ -4935,9 +4935,8 @@ class SingleAssignmentNode(AssignmentNode):
...
@@ -4935,9 +4935,8 @@ class SingleAssignmentNode(AssignmentNode):
from
.
import
ExprNodes
from
.
import
ExprNodes
if
not
isinstance
(
self
.
lhs
,
ExprNodes
.
TupleNode
):
if
not
isinstance
(
self
.
lhs
,
ExprNodes
.
TupleNode
):
return
return
for
arg
in
self
.
lhs
.
args
:
if
any
(
arg
.
is_starred
for
arg
in
self
.
lhs
.
args
):
if
arg
.
is_starred
:
return
return
unrolled
=
self
.
unroll
(
self
.
rhs
,
len
(
self
.
lhs
.
args
),
env
)
unrolled
=
self
.
unroll
(
self
.
rhs
,
len
(
self
.
lhs
.
args
),
env
)
if
not
unrolled
:
if
not
unrolled
:
...
...
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