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
Xavier Thompson
cython
Commits
056bf494
Commit
056bf494
authored
Sep 15, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache const-or-volatile-propagated entries from scope of const or volatile object"
parent
0be3c6cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+10
-5
No files found.
Cython/Compiler/Symtab.py
View file @
056bf494
...
@@ -3246,13 +3246,18 @@ class CConstOrVolatileScope(Scope):
...
@@ -3246,13 +3246,18 @@ class CConstOrVolatileScope(Scope):
self
.
base_type_scope
=
base_type_scope
self
.
base_type_scope
=
base_type_scope
self
.
is_const
=
is_const
self
.
is_const
=
is_const
self
.
is_volatile
=
is_volatile
self
.
is_volatile
=
is_volatile
self
.
cached_const_or_volatile_entries
=
{}
def
lookup_here
(
self
,
name
):
def
lookup_here
(
self
,
name
):
entry
=
self
.
base_type_scope
.
lookup_here
(
name
)
try
:
if
entry
is
not
None
:
return
self
.
cached_const_or_volatile_entries
[
name
]
entry
=
copy
.
copy
(
entry
)
except
KeyError
:
entry
.
type
=
PyrexTypes
.
c_const_or_volatile_type
(
entry
=
self
.
base_type_scope
.
lookup_here
(
name
)
entry
.
type
,
self
.
is_const
,
self
.
is_volatile
)
if
entry
is
not
None
:
entry
=
copy
.
copy
(
entry
)
entry
.
type
=
PyrexTypes
.
c_const_or_volatile_type
(
entry
.
type
,
self
.
is_const
,
self
.
is_volatile
)
self
.
cached_const_or_volatile_entries
[
name
]
=
entry
return
entry
return
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