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
6fa55268
Commit
6fa55268
authored
Jul 17, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make it explicit where type sorting is used in fused function dispatch
parent
f599da79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Cython/Compiler/FusedNode.py
Cython/Compiler/FusedNode.py
+4
-2
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+3
-3
No files found.
Cython/Compiler/FusedNode.py
View file @
6fa55268
...
...
@@ -483,8 +483,10 @@ class FusedCFuncDefNode(StatListNode):
Specialize fused types and split into normal types and buffer types.
"""
specialized_types
=
PyrexTypes
.
get_specialized_types
(
arg
.
type
)
# Prefer long over int, etc
# specialized_types.sort()
# Prefer long over int, etc by sorting (see type classes in PyrexTypes.py)
specialized_types
.
sort
()
seen_py_type_names
=
set
()
normal_types
,
buffer_types
=
[],
[]
has_object_fallback
=
False
...
...
Cython/Compiler/PyrexTypes.py
View file @
6fa55268
...
...
@@ -3011,10 +3011,10 @@ def specialization_signature_string(fused_compound_type, fused_to_specific):
return
fused_type
.
specialize
(
fused_to_specific
).
typeof_name
()
def
get_specialized_types
(
type
):
"""
Return a list of specialized types sorted in reverse order in accordance
with their preference in runtime fused-type dispatch
Return a list of specialized types in their declared order.
"""
assert
type
.
is_fused
...
...
@@ -3030,7 +3030,7 @@ def get_specialized_types(type):
specialization_signature_string
(
type
,
f2s
))
result
.
append
(
specialized_type
)
return
sorted
(
result
)
return
result
class
CFuncTypeArg
(
BaseType
):
...
...
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