OLD | NEW |
1 /* Handle parameterized types (templates) for GNU C++. | 1 /* Handle parameterized types (templates) for GNU C++. |
2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
3 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 | 3 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. | 5 Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. |
6 Rewritten by Jason Merrill (jason@cygnus.com). | 6 Rewritten by Jason Merrill (jason@cygnus.com). |
7 | 7 |
8 This file is part of GCC. | 8 This file is part of GCC. |
9 | 9 |
10 GCC is free software; you can redistribute it and/or modify | 10 GCC is free software; you can redistribute it and/or modify |
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 bool | 1641 bool |
1642 reregister_specialization (tree spec, tree tinfo, tree new_spec) | 1642 reregister_specialization (tree spec, tree tinfo, tree new_spec) |
1643 { | 1643 { |
1644 spec_entry **slot; | 1644 spec_entry **slot; |
1645 spec_entry elt; | 1645 spec_entry elt; |
1646 | 1646 |
1647 elt.tmpl = most_general_template (TI_TEMPLATE (tinfo)); | 1647 elt.tmpl = most_general_template (TI_TEMPLATE (tinfo)); |
1648 elt.args = TI_ARGS (tinfo); | 1648 elt.args = TI_ARGS (tinfo); |
1649 elt.spec = NULL_TREE; | 1649 elt.spec = NULL_TREE; |
1650 | 1650 |
1651 slot = (spec_entry **) htab_find_slot (decl_specializations, &elt, INSERT); | 1651 slot = (spec_entry **) htab_find_slot (decl_specializations, &elt, NO_INSERT); |
1652 if (*slot) | 1652 if (slot && *slot) |
1653 { | 1653 { |
1654 gcc_assert ((*slot)->spec == spec || (*slot)->spec == new_spec); | 1654 gcc_assert ((*slot)->spec == spec || (*slot)->spec == new_spec); |
1655 gcc_assert (new_spec != NULL_TREE); | 1655 gcc_assert (new_spec != NULL_TREE); |
1656 (*slot)->spec = new_spec; | 1656 (*slot)->spec = new_spec; |
1657 return 1; | 1657 return 1; |
1658 } | 1658 } |
1659 | 1659 |
1660 return 0; | 1660 return 0; |
1661 } | 1661 } |
1662 | 1662 |
(...skipping 18703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20366 pph_in_spec_entry_htab (stream, &decl_specializations); | 20366 pph_in_spec_entry_htab (stream, &decl_specializations); |
20367 if (flag_pph_dump_tree) | 20367 if (flag_pph_dump_tree) |
20368 pph_dump_spec_entry_htab (pph_logfile, "decl", &decl_specializations); | 20368 pph_dump_spec_entry_htab (pph_logfile, "decl", &decl_specializations); |
20369 pph_in_spec_entry_htab (stream, &type_specializations); | 20369 pph_in_spec_entry_htab (stream, &type_specializations); |
20370 if (flag_pph_dump_tree) | 20370 if (flag_pph_dump_tree) |
20371 pph_dump_spec_entry_htab (pph_logfile, "type", &type_specializations); | 20371 pph_dump_spec_entry_htab (pph_logfile, "type", &type_specializations); |
20372 } | 20372 } |
20373 | 20373 |
20374 | 20374 |
20375 #include "gt-cp-pt.h" | 20375 #include "gt-cp-pt.h" |
OLD | NEW |