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
eaebdfa3
Commit
eaebdfa3
authored
Mar 27, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NameNode to new temps
parent
3ef3a8ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-13
No files found.
Cython/Compiler/ExprNodes.py
View file @
eaebdfa3
...
...
@@ -1072,7 +1072,7 @@ class ImagNode(AtomicNewTempExprNode):
class
NameNode
(
AtomicExprNode
):
class
NameNode
(
Atomic
NewTemp
ExprNode
):
# Reference to a local or global variable name.
#
# name string Python name of the variable
...
...
@@ -1118,7 +1118,7 @@ class NameNode(AtomicExprNode):
node
.
entry
=
var_entry
node
.
analyse_rvalue_entry
(
env
)
return
node
return
AtomicExprNode
.
coerce_to
(
self
,
dst_type
,
env
)
return
super
(
NameNode
,
self
).
coerce_to
(
dst_type
,
env
)
def
analyse_as_module
(
self
,
env
):
# Try to interpret this as a reference to a cimported module.
...
...
@@ -1174,6 +1174,14 @@ class NameNode(AtomicExprNode):
if
not
self
.
entry
:
self
.
type
=
PyrexTypes
.
error_type
return
entry
=
self
.
entry
if
entry
:
entry
.
used
=
1
if
entry
.
type
.
is_buffer
:
import
Buffer
Buffer
.
used_buffer_aux_vars
(
entry
)
if
entry
.
utility_code
:
env
.
use_utility_code
(
entry
.
utility_code
)
self
.
analyse_rvalue_entry
(
env
)
def
analyse_target_types
(
self
,
env
):
...
...
@@ -1260,17 +1268,6 @@ class NameNode(AtomicExprNode):
# result is in a temporary.
return
0
def
allocate_temp
(
self
,
env
,
result
=
None
):
AtomicExprNode
.
allocate_temp
(
self
,
env
,
result
)
entry
=
self
.
entry
if
entry
:
entry
.
used
=
1
if
entry
.
type
.
is_buffer
:
import
Buffer
Buffer
.
used_buffer_aux_vars
(
entry
)
if
entry
.
utility_code
:
env
.
use_utility_code
(
entry
.
utility_code
)
def
calculate_result_code
(
self
):
entry
=
self
.
entry
if
not
entry
:
...
...
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