Commit bb9f8a85 by Carlo Wood

* bits/demangle.h

namespace __gnu_cxx::demangler
(session<Allocator>::qualifier_list_Allocator): Add
(session<Allocator>::M_qualifier_list_alloc): Add
(session<Allocator>::decode_type_with_postfix):
Use M_qualifier_list_alloc instead of calling operator new/delete.

From-SVN: r78457
parent e22db4bf
2004-02-25 Carlo Wood <carlo@alinoe.com>
* bits/demangle.h
namespace __gnu_cxx::demangler
(session<Allocator>::qualifier_list_Allocator): Add
(session<Allocator>::M_qualifier_list_alloc): Add
(session<Allocator>::decode_type_with_postfix):
Use M_qualifier_list_alloc instead of calling operator new/delete.
2004-02-24 Paolo Carlini <pcarlini@suse.de> 2004-02-24 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/14252 PR libstdc++/14252
...@@ -163,7 +172,7 @@ ...@@ -163,7 +172,7 @@
* docs/html/ext/mt_allocator.html: Change due to that deallocated * docs/html/ext/mt_allocator.html: Change due to that deallocated
blocks now are added to the front of freelists. The reason to this blocks now are added to the front of freelists. The reason to this
approach is also explained. approach is also explained.
2004-02-17 Paolo Carlini <pcarlini@suse.de> 2004-02-17 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get<>::_M_extract_float, * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
...@@ -776,11 +785,11 @@ ...@@ -776,11 +785,11 @@
2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com> 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
* config/local/generic/c_locale.h: Change ::malloc() to new char[]. * config/local/generic/c_locale.h: Change ::malloc() to new char[].
* config/local/gnu/c_locale.h: Change ::malloc() to new char[]. * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
* include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
std::get_temporary_buffer() instead of duplicating its code. std::get_temporary_buffer() instead of duplicating its code.
Update to C++STYLE conventions. Update to C++STYLE conventions.
* include/std/std_memory.h (get_temporary_buffer): Use ::operator * include/std/std_memory.h (get_temporary_buffer): Use ::operator
new() instead of std::malloc(). new() instead of std::malloc().
(return_temporary_buffer): Use ::operator delete() instead of (return_temporary_buffer): Use ::operator delete() instead of
std::free(). std::free().
......
...@@ -378,6 +378,9 @@ namespace __gnu_cxx ...@@ -378,6 +378,9 @@ namespace __gnu_cxx
int M_template_arg_pos_offset; int M_template_arg_pos_offset;
std::vector<substitution_st, subst_Allocator> M_substitutions_pos; std::vector<substitution_st, subst_Allocator> M_substitutions_pos;
implementation_details const& M_implementation_details; implementation_details const& M_implementation_details;
typedef typename Allocator::template
rebind<qualifier_list<Allocator> >::other qualifier_list_Allocator;
qualifier_list_Allocator M_qualifier_list_alloc;
#if _GLIBCXX_DEMANGLER_CWDEBUG #if _GLIBCXX_DEMANGLER_CWDEBUG
bool M_inside_add_substitution; bool M_inside_add_substitution;
#endif #endif
...@@ -1849,7 +1852,10 @@ namespace __gnu_cxx ...@@ -1849,7 +1852,10 @@ namespace __gnu_cxx
++M_inside_type; ++M_inside_type;
bool recursive_template_param_or_substitution_call; bool recursive_template_param_or_substitution_call;
if (!(recursive_template_param_or_substitution_call = qualifiers)) if (!(recursive_template_param_or_substitution_call = qualifiers))
qualifiers = new qualifier_list<Allocator>(*this); {
qualifier_list<Allocator>* raw_qualifiers = M_qualifier_list_alloc.allocate(1);
qualifiers = new (raw_qualifiers) qualifier_list<Allocator>(*this);
}
// First eat all qualifiers. // First eat all qualifiers.
bool failure = false; bool failure = false;
for(;;) // So we can use 'continue' to eat the next qualifier. for(;;) // So we can use 'continue' to eat the next qualifier.
...@@ -2181,7 +2187,10 @@ namespace __gnu_cxx ...@@ -2181,7 +2187,10 @@ namespace __gnu_cxx
decode_type_exit: decode_type_exit:
--M_inside_type; --M_inside_type;
if (!recursive_template_param_or_substitution_call) if (!recursive_template_param_or_substitution_call)
delete qualifiers; {
qualifiers->~qualifier_list<Allocator>();
M_qualifier_list_alloc.deallocate(qualifiers, 1);
}
if (failure) if (failure)
_GLIBCXX_DEMANGLER_FAILURE; _GLIBCXX_DEMANGLER_FAILURE;
_GLIBCXX_DEMANGLER_RETURN2; _GLIBCXX_DEMANGLER_RETURN2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment