projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
414ea4a
)
Add comment
author
Mark Mitchell
<mmitchel@gcc.gnu.org>
Fri, 29 Dec 2000 06:09:44 +0000
(06:09 +0000)
committer
Mark Mitchell
<mmitchel@gcc.gnu.org>
Fri, 29 Dec 2000 06:09:44 +0000
(06:09 +0000)
From-SVN: r38525
gcc/cp/pt.c
patch
|
blob
|
history
diff --git
a/gcc/cp/pt.c
b/gcc/cp/pt.c
index 29047d7306bb106d0115eb8fd00513d67f278d50..cc18eef4ac9f84dc1e8dffd4c57f1aa3ccba033a 100644
(file)
--- a/
gcc/cp/pt.c
+++ b/
gcc/cp/pt.c
@@
-3962,10
+3962,14
@@
lookup_template_class (d1, arglist, in_decl, context, entering_scope)
if (comp_template_args (TREE_PURPOSE (*tp), arglist))
{
found = *tp;
+
+ /* Use the move-to-front heuristic to speed up future
+ searches. */
*tp = TREE_CHAIN (*tp);
TREE_CHAIN (found)
= DECL_TEMPLATE_INSTANTIATIONS (template);
DECL_TEMPLATE_INSTANTIATIONS (template) = found;
+
return TREE_VALUE (found);
}