aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>2000-12-29 06:09:44 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-12-29 06:09:44 +0000
commit7e7d95175604e98bd3d23134f6d708d87a66b5ed (patch)
treec55b720224894cd07ce0458ab7429a9e6bfa8dcb /gcc
parent414ea4aa86729f98a5b54242f9234bc412d6119b (diff)
downloadgcc-7e7d95175604e98bd3d23134f6d708d87a66b5ed.zip
gcc-7e7d95175604e98bd3d23134f6d708d87a66b5ed.tar.gz
gcc-7e7d95175604e98bd3d23134f6d708d87a66b5ed.tar.bz2
Add comment
From-SVN: r38525
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 29047d7..cc18eef 100644
--- 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);
}