1 2004-01-31 Per Bothner <per@bothner.com>
3 * include/ext/mt_allocator.h
4 (__mt_alloc::_S_thread_freelist_mutex): Guard with
7 2004-01-31 Paolo Carlini <pcarlini@suse.de>
9 * include/bits/basic_string.tcc (_Rep::_S_create): Minor tweak.
11 2004-01-30 Paolo Carlini <pcarlini@suse.de>
13 * testsuite/21_strings/basic_string/cons/char/6.cc: New.
14 * testsuite/21_strings/basic_string/cons/wchar_t/6.cc: New.
15 * testsuite/performance/21_strings/string_cons_input_iterator.cc: New.
17 2004-01-30 Felix Yen <fwy@alumni.brown.edu>
19 * testsuite/performance/20_util/allocator_thread.cc (do_loop):
20 Don't use clear, but instead assign. Use insert.
22 2004-01-30 Benjamin Kosnik <bkoz@redhat.com>
24 * src/demangle.cc: Add instantiations.
25 * src/Makefile.am: Remove special rules for demangle.lo, demangle.o.
26 * src/Makefile.in: Regenerate.
28 2004-01-30 David Edelsohn <edelsohn@gnu.org>
30 * src/allocator.cc: Protect _S_get_thread_id() and
31 _S_thread_key_destr() with #ifdef __GTHREADS.
33 2004-01-30 Paolo Carlini <pcarlini@suse.de>
35 Reshuffle performance testsuite.
36 * testsuite/performance/allocator.cc, allocator_map_thread.cc,
37 allocator_thread.cc, complex_norm.cc, container_benchmark.cc,
38 cout_insert_int.cc, filebuf_copy.cc, filebuf_sputc.cc,
39 fstream_seek_write.cc, ifstream_extract_float.cc,
40 ifstream_extract_int.cc, ifstream_getline.cc, is_wchar_t.cc,
41 list_create_fill_sort.cc, map_create_fill.cc,
42 narrow_widen_char.cc, narrow_widen_wchar_t.cc,
43 ofstream_insert_float.cc, ofstream_insert_int.cc,
44 string_append.cc, wchar_t_in.cc, wchar_t_length.cc,
45 wchar_t_out.cc: Split into...
46 * testsuite/performance/20_util/allocator.cc: New.
47 * testsuite/performance/20_util/allocator_map_thread.cc: New.
48 * testsuite/performance/20_util/allocator_thread.cc: New.
49 * testsuite/performance/21_strings/string_append: New.
50 * testsuite/performance/22_locale/is_wchar_t.cc: New.
51 * testsuite/performance/22_locale/narrow_widen_char.cc: New.
52 * testsuite/performance/22_locale/narrow_widen_wchar_t.cc: New.
53 * testsuite/performance/22_locale/wchar_t_in.cc: New.
54 * testsuite/performance/22_locale/wchar_t_length.cc: New.
55 * testsuite/performance/22_locale/wchar_t_out.cc: New.
56 * testsuite/performance/23_containers/container_benchmark.cc: New.
57 * testsuite/performance/23_containers/list_create_fill_sort.cc: New.
58 * testsuite/performance/23_containers/map_create_fill.cc: New.
59 * testsuite/performance/26_numerics/complex_norm.cc: New.
60 * testsuite/performance/27_io/cout_insert_int.cc: New.
61 * testsuite/performance/27_io/filebuf_copy.cc: New.
62 * testsuite/performance/27_io/filebuf_sputc.cc: New.
63 * testsuite/performance/27_io/fstream_seek_write.cc: New.
64 * testsuite/performance/27_io/ifstream_extract_float.cc: New.
65 * testsuite/performance/27_io/ifstream_extract_int.cc: New.
66 * testsuite/performance/27_io/ifstream_getline.cc: New.
67 * testsuite/performance/27_io/ofstream_insert_float.cc: New.
68 * testsuite/performance/27_io/ofstream_insert_int.cc: New.
70 2004-01-30 Paolo Carlini <pcarlini@suse.de>
72 * include/bits/basic_string.tcc (_Rep::_S_create):
73 Never allocate a string bigger than max_size(); always keep
74 __capacity and __size in sync to avoid memory leaks at
77 2004-01-30 Paolo Carlini <pcarlini@suse.de>
79 * include/bits/basic_string.tcc (_S_construct(_InIterator,
80 _InIterator, const _Alloc&, input_iterator_tag)): Simplify
81 the double loop, streamline.
83 * include/bits/basic_string.tcc: Very minor tweaks.
85 2004-01-30 Loren J. Rittle <ljrittle@acm.org>
87 * scripts/check_performance: Only compile with $THREAD_FLAG
88 when test is marked to require it. Allow multiple
89 compilations/executions of marked tests.
90 * testsuite/testsuite_performance.h (report_performance):
91 Report dynamic thread support status.
92 (report_header): Likewise.
93 * testsuite/performance/allocator.cc: Stabilize iteration
94 count. Support more allocators. Mark each allocator test to
95 run and report independently.
96 * testsuite/performance/allocator_map_thread.cc: Likewise.
97 * testsuite/performance/allocator_thread.cc: Likewise.
99 2004-01-29 Stephen M. Webb <stephen.webb@bregmasoft.com>
101 * config/local/generic/c_locale.h: Change ::malloc() to new char[].
102 * config/local/gnu/c_locale.h: Change ::malloc() to new char[].
103 * include/bits/stl_tempbuf.h: Convert _Temporary_buffer to use
104 std::get_temporary_buffer() instead of duplicating its code.
105 Update to C++STYLE conventions.
106 * include/std/std_memory.h (get_temporary_buffer): Use ::operator
107 new() instead of std::malloc().
108 (return_temporary_buffer): Use ::operator delete() instead of
111 2004-01-29 Benjamin Kosnik <bkoz@redhat.com>
113 * include/bits/allocator.h: Temporary switch to new_allocator as
114 the default to unjam bootstraps.
116 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
118 * include/Makefile.am (bits_headers): Remove allocator_traits.h.
119 * include/Makefile.in: Regenerate.
120 * include/bits/allocator_traits.h: Remove.
121 * include/bits/allocator.h: Remove allocator_traits.h include, and
123 (allocator): Empty base class, inherit from the underlying allocator.
124 * src/allocator-inst.cc: Move __pool_alloc instantiation to...
125 * src/allocator.cc: ...here. New. For the underlying allocators.
126 Add __mt_alloc, __pool_alloc, new_allocator, malloc_allocator bits.
127 * config/linker-map.gnu: Remove __pool_alloc bits.
128 * src/Makefile.am (sources): Add allocator.cc.
129 * src/Makefile.in: Regenerate.
130 * testsuite/20_util/allocator/1.cc: Split second test into...
131 * testsuite/20_util/allocator/8230.cc: ...this.
132 * include/bits/stl_bvector.h (__gnu_norm): Change bit_vector
133 typedef to use std::allocatore. Format.
134 * include/ext/pool_allocator.h: Remove allocator_traits.h include,
136 * include/ext/mt_allocator.h (__gnu_cxx): Qualify
137 __throw_bad_alloc calls. Don't include <memory>.
138 * include/ext/malloc_allocator.h: Remove <memory> include.
139 * include/ext/new_allocator.h (new_allocator): Same.
140 * include/ext/ropeimpl.h (__gnu_cxx): Remove __alloc using
141 declaration. Switch __alloc to _Alloc.
142 * include/ext/hashtable.h: Remove __alloc.
143 * include/backward/alloc.h: Only inject allocator, not
144 implementation details.
146 * include/ext/mt_allocator.h: Replace free with delete.
148 2004-01-28 Benjamin Kosnik <bkoz@redhat.com>
150 * src/globals_io.cc: Change to __gnu_internal namespace.
151 * src/globals_locale.cc: Same.
152 * src/locale_init.cc: Same.
153 * src/ios_init.cc: Same.
155 2004-01-28 Stefan Olsson <stefan@snon.net>
157 * include/ext/mt_allocator.h: Replaced all malloc() calls with
158 operator new(). Added support for the env variable
159 GLIBCXX_FORCE_NEW (this required the _S_init call to be the first
160 one in allocate() as well). Fix typos.
162 2004-01-28 Paolo Carlini <pcarlini@suse.de>
164 * include/bits/basic_string.h (_S_create(size_t,
165 const _Alloc&): Change signature to take two size_type
167 * include/bits/basic_string.tcc (_S_construct(_InIterator,
168 _InIterator, const _Alloc&, input_iterator_tag)): Update
170 (_S_construct(_InIterator, _InIterator, const _Alloc&,
171 forward_iterator_tag)): Likewise.
172 (_S_construct(size_type, _CharT, const _Alloc&)): Likewise.
173 (_M_mutate(size_type, size_type, size_type)): Don't
174 implement the exponential growth policy, demand it to
175 _S_create, update call and simplify.
176 (_M_clone(const _Alloc&, size_type)): Likewise.
177 (_S_create(size_type, size_type, const _Alloc&)): Implement
178 the growth policy, simplify otherwise.
180 * include/bits/basic_string.h (_Rep::operator[]): Tweak
181 signature to take a size_type, consistently with the other
184 2004-01-27 Benjamin Kosnik <bkoz@redhat.com>
186 * testsuite/27_io/ios_base/storage/11584.cc: Correct new and
187 delete declarations, add include and test variable.
189 2003-01-27 Jerry Quinn <jlquinn@optonline.net>
191 * include/bits/codecvt.h, include/bits/locale_facets.h,
192 include/bits/postypes.h, include/bits/stl_bvector.h,
193 include/bits/stl_multiset.h, include/bits/stl_set.h,
194 include/bits/stream_iterator.h, include/bits/streambuf_iterator.h,
195 include/std/std_complex.h: Document.
197 2004-01-27 Jerry Quinn <jlquinn@optonline.net>
200 * include/bits/ios_base.h (ios_base::_M_grow_words): Add
201 iword/pword selector.
202 (ios_base::iword, ios_base::pword): Use it.
203 * src/ios.cc (ios_base::_M_grow_words): Clear _M_word_zero
204 iword or pword member on alloc failure.
205 * testsuite/27_io/ios_base/storage/11584.cc: New test.
207 2004-01-27 Ulrich Weigand <uweigand@de.ibm.com>
208 PJ Darcy <darcypj@us.ibm.com>
210 * configure.host: Add support for *-tpf.
211 * crossconfig.m4: Likewise.
212 * configure: Regenerate.
213 * config/os/tpf: New directory.
214 * config/os/tpf/os_defines.h: New file.
215 * config/os/tpf/ctype_base.h: Likewise.
216 * config/os/tpf/ctype_inline.h: Likewise.
217 * config/os/tpf/ctype_noninline.h: Likewise.
219 2004-01-27 Paolo Carlini <pcarlini@suse.de>
222 * include/bits/sstream.tcc: Guard use of extern template.
224 2004-01-27 Paolo Carlini <pcarlini@suse.de>
226 * include/bits/basic_string.tcc
227 (basic_string(const basic_string&, size_type, size_type),
228 basic_string(const basic_string&, size_type, size_type,
229 const _Alloc&)): Avoid unnecessarily constructing iterators.
231 2004-01-26 Paolo Carlini <pcarlini@suse.de>
233 * config/locale/generic/c_locale.cc: Fix throw messages
234 to use the __N marker.
235 * config/locale/gnu/c_locale.cc: Likewise.
236 * config/locale/ieee_1003.1-2001/codecvt_specializations.h:
238 * docs/html/17_intro/C++STYLE: Likewise.
239 * include/bits/basic_ios.tcc: Likewise.
240 * include/bits/fstream.tcc: Likewise.
241 * include/bits/vector.tcc: Likewise.
242 * include/ext/ropeimpl.h: Likewise.
243 * include/std/std_bitset.h: Likewise.
244 * src/ios.cc: Likewise.
245 * src/locale.cc: Likewise.
246 * src/localename.cc: Likewise.
248 2004-01-26 Paolo Carlini <pcarlini@suse.de>
250 * include/bits/basic_string.h (_M_replace_aux): Use the
251 __N marker in throw message.
252 * include/bits/basic_string.tcc (assign(const _CharT*,
253 size_type), insert(size_type, const _CharT*, size_type),
254 replace(size_type, size_type, const _CharT*, size_type),
255 reserve, _Rep::_S_create, resize, _M_replace_dispatch):
258 * include/bits/basic_string.h, include/bits/basic_string.tcc:
259 Fold overlong lines, minor formatting changes.
261 2004-01-26 Paolo Carlini <pcarlini@suse.de>
263 * include/bits/basic_string.h (replace(iterator, iterator,
264 const basic_string&)): Remove _GLIBCXX_DEBUG_PEDASSERT.
265 (replace(iterator, iterator, const _CharT*)): Ditto.
266 (replace(iterator, iterator, const _CharT*, size_type)):
267 Add missing _GLIBCXX_DEBUG_PEDASSERT.
269 2004-01-26 Paolo Carlini <pcarlini@suse.de>
271 * include/bits/basic_string.tcc (replace(size_type,
272 size_type, const _CharT*, size_type)): Implement optimized
273 in-place algorithm for non-overlapping ranges.
274 * testsuite/21_strings/basic_string/replace/char/6.cc: New.
275 * testsuite/21_strings/basic_string/replace/wchar_t/6.cc: New.
277 * include/bits/basic_string.tcc (insert(size_type,
278 const _CharT*, size_type)): Tweak slightly.
280 2004-01-26 Andreas Schwab <schwab@suse.de>
282 * config/locale/gnu/monetary_members.cc: Restore locale before
283 rethrowing exception.
285 2004-01-25 Paolo Carlini <pcarlini@suse.de>
287 * include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
289 * include/bits/basic_string.tcc (_M_replace_aux, _M_replace_safe):
292 * include/bits/basic_string.tcc: Very minor tweaks.
294 2004-01-25 Paolo Carlini <pcarlini@suse.de>
296 * testsuite/performance/string_append.cc: Increase number
299 2004-01-25 Paolo Carlini <pcarlini@suse.de>
301 * include/bits/basic_string.h (erase(size_type, size_type),
302 erase(iterator), erase(iterator, iterator)): Call _M_replace_safe
303 instead, thus avoiding redundant check for length_error.
305 * include/bits/basic_string.h: Tweak some comments.
307 2004-01-24 Paolo Carlini <pcarlini@suse.de>
309 * include/bits/basic_string.tcc (operator+(const _CharT*,
310 const basic_string&)): No need to go through the append
311 taking two iterators.
313 2004-01-24 Paolo Carlini <pcarlini@suse.de>
315 * include/bits/basic_string.tcc (rfind(_CharT, size_type)):
316 Revert last change to use std::min: machine language is worse.
317 (find_last_of(const _CharT*, size_type, size_type)): Ditto.
318 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
319 (find_last_not_of(_CharT, size_type)): Ditto.
321 * include/bits/basic_string.tcc (insert(size_type, const _CharT*,
322 size_type)): Discard the value returned by _M_check.
323 (replace(size_type, size_type, const _CharT*, size_type)): Ditto.
324 (append(const basic_string&, size_type, size_type)): Ditto.
325 (copy(_CharT*, size_type, size_type)): Ditto.
326 (compare(size_type, size_type, const basic_string&)): Ditto.
327 (compare(size_type, size_type, const basic_string&,
328 size_type, size_type)): Ditto.
329 (compare(size_type, size_type, const _CharT*)): Ditto.
330 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
332 2004-01-24 Paolo Carlini <pcarlini@suse.de>
334 * include/bits/basic_string.h (insert(size_type,
335 const basic_string&, size_type, size_type)): Define inline here.
336 * include/bits/basic_string.tcc (insert(size_type,
337 const basic_string&, size_type, size_type)): Move inline.
339 2004-01-24 Paolo Carlini <pcarlini@suse.de>
341 * include/bits/basic_string.h (assign(const basic_string&,
342 size_type, size_type)): Define inline here.
343 (replace(size_type, size_type, const basic_string&,
344 size_type, size_type)): Ditto.
345 (_M_replace_dispatch(iterator, iterator, _InputIterator,
346 _InputIterator, __false_type)): Only declare.
347 (_M_replace(iterator, iterator, _InputIterator,
348 _InputIterator)): Remove.
349 * include/bits/basic_string.tcc (assign(const basic_string&,
350 size_type, size_type)): Move inline.
351 (replace(size_type, size_type, const basic_string&,
352 size_type, size_type)): Ditto.
353 (_M_replace_dispatch(iterator, iterator, _InputIterator,
354 _InputIterator, __false_type)): Define, now does also what
355 _M_replace did before.
356 * src/string-inst.cc (_M_replace): Don't instantiate.
358 * include/bits/basic_string.tcc (find(const _CharT*,
359 size_type, size_type)): Tidy.
360 (rfind(_CharT, size_type)): Ditto.
361 (find_first_not_of(const _CharT*, size_type, size_type)): Ditto.
362 (find_first_not_of(_CharT, size_type)): Ditto.
363 (find_last_not_of(const _CharT*, size_type, size_type)): Ditto.
364 (find_last_not_of(_CharT, size_type)): Ditto.
366 2004-01-23 Paolo Carlini <pcarlini@suse.de>
369 * include/debug/bitset (operator|=): Fix typo.
370 * testsuite/23_containers/bitset/operations/13838.cc: New.
372 2004-01-23 Paolo Carlini <pcarlini@suse.de>
374 * include/bits/basic_string.tcc (insert(size_type,
375 const _CharT*, size_type __n)): Fix length_error check.
376 (replace(size_type, size_type, const _CharT*, size_type):
377 Ditto; call _M_replace_safe.
378 (_M_replace_aux(size_type, size_type, size_type, _CharT):
379 Fix length_error check.
380 (_M_replace(iterator, iterator, _InputIterator,
381 _InputIterator)): Ditto, tweak.
382 (_M_replace_safe(size_type, size_type, const _CharT*,
383 size_type)): Remove length_error check.
385 * include/bits/basic_string.tcc (append(const basic_string&),
386 append(const basic_string&, size_type, size_type)): Tweak
389 * include/bits/basic_string.tcc (copy(_CharT*, size_type,
390 size_type)): If __n == 0 don't call traits::copy.
392 2004-01-23 Stefan Olsson <stefan@snon.net>
394 * include/ext/mt_allocator.h: Reduce lock contention.
396 2004-01-23 Paolo Carlini <pcarlini@suse.de>
399 * include/bits/fstream.tcc (underflow): Remove unused
401 * include/bits/streambuf_iterator.h (equal): Ditto.
402 * include/bits/locale_facets.h (_M_convert_from_char):
405 2004-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
408 * config/linker-map.gnu (nan): Delete.
409 * libmath/mathconf.h (NAN, nan): Delete.
410 * linkage.m4 (nan): Don't check for it.
411 * libmath/nan.c: Delete file.
413 * config.h.in, configure: Regenerate.
415 2004-01-23 Paolo Carlini <pcarlini@suse.de>
417 * include/bits/basic_string.h (push_back(_CharT)):
419 (insert(size_type, const basic_string&)): Trivial tweak.
420 (insert(size_type, size_type, _CharT)): Call _M_replace_aux.
421 (insert(iterator, _CharT)): Ditto.
422 (erase(size_type, size_type)): Ditto.
423 (erase(iterator)): Ditto.
424 (erase(iterator, iterator)): Ditto.
425 (replace(size_type, size_type, size_type, _CharT)): Ditto.
427 2004-01-23 Loren J. Rittle <ljrittle@acm.org>
430 * testsuite/performance/allocator_map_thread.cc: New test.
432 2004-01-22 Paolo Carlini <pcarlini@suse.de>
434 * include/bits/locale_facets.tcc
435 (money_put::do_put(..., long double)): Use the basic_string
436 constructor for char arrays, not that for C-strings, to pass
437 __digits to do_put(..., const string_type&): __ws isn't
440 2004-01-22 Paolo Carlini <pcarlini@suse.de>
442 * include/bits/basic_string.h (_M_replace_safe): Change
443 signatures to take size_types and const _CharT*.
444 (_M_replace_aux): Likewise, takes size_types instead of
446 (append(size_type, _CharT)): Update call.
447 (assign(size_type, _CharT)): Ditto.
448 (replace(iterator, iterator, size_type, _CharT)): Ditto.
449 (_M_replace_dispatch(iterator, iterator, _Integer,
450 _Integer, __true_type)): Ditto.
451 * include/bits/basic_string.tcc (assign(const _CharT*,
453 (insert(size_type, const _CharT*, size_type)): Ditto.
454 (replace(size_type, size_type, const _CharT*,
456 (_M_replace(iterator, iterator, _InputIterator,
457 _InputIterator)): Ditto.
458 (append(const basic_string&)): Ditto.
459 (append(const basic_string&, size_type, size_type): Ditto.
460 (append(const _CharT*, size_type): Ditto.
461 (_M_replace_safe, _M_replace_safe): Change definitions
462 accordingly, simplify.
463 * string-inst.cc (_M_replace_safe): Don't instantiate.
465 2004-01-21 Paolo Carlini <pcarlini@suse.de>
467 * include/bits/basic_string.tcc (append(const basic_string&)):
468 Revert previous change.
469 (append(const basic_string&, size_type, size_type)): Revert
470 previous change, use _M_check and _M_limit.
472 2004-01-21 Paolo Carlini <pcarlini@suse.de>
474 * include/bits/basic_string.h (_M_check): Change to return
475 a checked __pos and take an additional const char* argument.
476 (_M_fold): Rename to _M_limit, change to return a size_type,
477 corresponding to the __off limited to the actual length.
478 (insert(size_type, size_type, _CharT)): Update call, call
480 (insert(iterator, _CharT)): Call replace(iterator, iterator,
481 size_type, _CharT) instead.
482 (erase(size_type, size_type)): Update calls.
483 (replace(size_type, size_type, size_type, _CharT)): Ditto.
484 (substr(size_type, size_type)): Use _M_check.
485 * include/bits/basic_string.tcc (basic_string(const basic_string&,
486 size_type, size_type)): Update calls.
487 (basic_string(const basic_string&, size_type, size_type,
488 const _Alloc&)): Ditto.
489 (assign(const basic_string&, size_type, size_type)): Use the
490 new _M_check and _M_limit.
491 (insert(size_type, const basic_string&, size_type, size_type):
493 (insert(size_type, const _CharT*, size_type)): Ditto.
494 (replace(size_type, size_type, const _CharT*, size_type): Ditto.
495 (replace(size_type, size_type, const basic_string&,
496 size_type, size_type)): Ditto.
497 (append(const basic_string&)): Ditto.
498 (append(const basic_string&, size_type, size_type)): Ditto.
499 (copy(_CharT*, size_type, size_type)): Ditto.
500 (compare(size_type, size_type, const basic_string&)): Ditto.
501 (compare(size_type, size_type, const basic_string&,size_type,
503 (compare(size_type, size_type, const _CharT*)): Ditto.
504 (compare(size_type, size_type, const _CharT*, size_type)): Ditto.
506 2004-01-19 Stefan Olsson <stefan@snon.net>
508 * include/ext/mt_allocator.h: If a thread, when it dies, still has
509 memory on it's freelist this memory is not returned to global
510 list. Simplification of deallocate so that memory is always
511 returned to the calling thread id's freelist instead of to
512 global. Fix typos. Add volatile where appropriate.
514 2004-01-19 Loren J. Rittle <ljrittle@acm.org>
516 * testsuite/ext/stdio_filebuf/char/10063-2.cc: Treat unbuffered.
517 * testsuite/ext/stdio_filebuf/char/10063-3.cc: New test. Like -2 but
518 use __gnu_cxx::stdio_sync_filebuf<char> instead; allow buffered stream.
520 2004-01-19 Paolo Carlini <pcarlini@suse.de>
522 * src/debug.cc: Make sure all the names are prefixed with
523 double (or single) underscore.
525 2004-01-19 Paolo Carlini <pcarlini@suse.de>
527 * src/debug.cc: Trivial formatting change.
529 2004-01-19 Paolo Carlini <pcarlini@suse.de>
531 * include/bits/basic_string.tcc (_S_construct(size_type,
532 _CharT, const _Alloc&)): Remove redundant try/catch.
533 (_M_mutate(size_type, size_type, size_type)): Ditto.
534 (_M_clone(const _Alloc&, size_type)): Ditto.
536 2004-01-18 Paolo Carlini <pcarlini@suse.de>
538 * include/bits/basic_string.h (c_str()): Simplify, due to
539 21.3.4 the internal representation is always kept null-terminated.
540 * include/bits/basic_string.tcc (_M_clone): Null-terminate.
541 * testsuite/21_strings/basic_string/element_access/char/4.cc: New.
542 * testsuite/21_strings/basic_string/element_access/wchar_t/4.cc:
545 2004-01-18 Paolo Carlini <pcarlini@suse.de>
547 * include/bits/basic_string.h (append(size_type, _CharT)):
548 Moved inline, just call _M_replace_aux, no source iterators at
549 risk of being clobbered.
550 (assign(size_type, _CharT)): Call directly _M_replace_aux.
551 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
552 input_iterator_tag)): Remove fifth unused argument.
553 (_M_replace_dispatch(iterator, iterator, _InputIterator,
554 _InputIterator, __false_type)): Update call.
555 * include/bits/basic_string.tcc (replace(size_type, size_type,
556 const _CharT*, size_type)): Update call.
557 (_M_replace_aux(iterator, iterator, size_type, _CharT)): Tweak
558 throw string literal.
559 (_M_replace_safe(iterator, iterator, _ForwardIterator,
560 _ForwardIterator)): Likewise.
561 (_M_replace(iterator, iterator, _InputIterator, _InputIterator,
562 input_iterator_tag)): Remove fifth unused argument.
563 (append(size_type __n, _CharT __c)): Move inline.
564 * src/string-inst.cc (S::_M_replace(S::iterator, S::iterator,
565 const C*, const C*, input_iterator_tag)): Remove fifth unused
568 2004-01-16 Benjamin Kosnik <bkoz@redhat.com>
570 * testsuite/ext/enc_filebuf/char/13189.cc: Fix guards.
571 * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Same.
573 2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
575 * testsuite/testsuite_hooks.cc (try_mkfifo): Avoid calling
578 2004-01-15 Stefan Olsson <stefan@snon.net>
580 * include/ext/mt_allocator.h: Reuse thread id's as soon as
581 possible by changing the behaviour of thread_freelist to do
582 push_front when threads die instead of push_back.
584 2004-01-14 Paolo Carlini <pcarlini@suse.de>
586 * include/bits/locale_facets.h (struct __numpunct_cache):
587 Add member _M_grouping_size, caching the length of _M_grouping.
588 (__numpunct_cache<>::_M_cache): Assign the latter.
589 (__verify_grouping): Move declaration...
590 * include/bits/locale_facets.tcc (__verify_grouping):
591 ... here, change signature to take a const char* and a size_t
592 for the grouping; not a template anymore.
593 (__add_grouping, num_put::_M_group_int, num_put::_M_group_float):
594 Likewise change signature and tweak consistently.
595 (num_get::_M_extract_float, num_get::_M_extract_int,
596 num_put::_M_insert_int, num_put::_M_insert_float,
597 money_get::do_get(string_type&), money_get::do_put(string_type)):
599 * config/locale/generic/numeric_members.cc
600 (numpunct<>::_M_initialize_numpunct): Assign the new member.
601 * config/locale/gnu/numeric_members.cc
602 (numpunct<>::_M_initialize_numpunct): Likewise.
603 * src/locale-inst.cc (__add_grouping): Tweak signature.
604 (__verify_grouping): Don't instantiate, not a template anymore.
606 * include/bits/locale_facets.h: Rename _M_truename_len ->
607 _M_truename_size, _M_falsename_len -> _M_falsename_size.
608 * include/bits/locale_facets.tcc: Likewise.
609 * config/locale/generic/numeric_members.cc: Likewise.
610 * config/locale/gnu/numeric_members.cc: Likewise.
612 2004-01-14 Stefan Olsson <stefan@snon.net>
614 * include/ext/mt_allocator.h: Fixups.
615 * testsuite/performance/allocator.cc: Enable __mt_alloc tests.
616 * testsuite/performance/allocator_thread.cc: Same.
618 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
620 * testsuite/performance/ifstream_extract_float.cc: Add higher
622 * testsuite/performance/ofstream_insert_float.cc: Same.
624 2004-01-13 Paolo Carlini <pcarlini@suse.de>
626 * src/locale-misc-inst.cc (__convert_from_v(long),
627 __convert_from_v(unsigned long), __convert_from_v(long long),
628 __convert_from_v(unsigned long long)): Remove, unused.
630 2004-01-13 Benjamin Kosnik <bkoz@redhat.com>
632 * testsuite/performance/ifstream_extract_float.cc: New.
633 * testsuite/performance/ofstream_insert_float.cc: Float generation
636 * 20_util/auto_ptr.cc, auto_ptr_neg.cc: Break into...
637 * 20_util/auto_ptr/1.cc: ...this.
638 * 20_util/auto_ptr/2.cc: Same.
639 * 20_util/auto_ptr/3.cc: Same.
640 * 20_util/auto_ptr/3946.cc: Same.
641 * 20_util/auto_ptr/4.cc: Same.
642 * 20_util/auto_ptr/5.cc: Same.
643 * 20_util/auto_ptr/6.cc: Same.
644 * 20_util/auto_ptr/7.cc: Same.
645 * 20_util/auto_ptr/assign_neg.cc
646 * 20_util/pairs.cc: Break into...
647 * 20_util/pair/1.cc: ...this.
648 * 20_util/pair/2.cc: Same.
649 * 20_util/pair/3.cc: Same.
650 * 20_util/pair/4.cc: Same.
652 2004-01-13 Paolo Carlini <pcarlini@suse.de>
654 * include/bits/locale_facets.tcc (num_get::do_get(void*&)):
655 Set correctly just basefield, the only group that matters.
657 2004-01-13 Paolo Carlini <pcarlini@suse.de>
659 * include/ext/rope (_Rope_rep_alloc_base): Eliminate.
660 (_Rope_rep_base): Inherit directly from the rope allocator;
661 use rebinding instead of _Alloc_traits; pick up data member
662 from _Rope_rep_alloc_base.
663 (_Rope_alloc_base): Eliminate.
664 (_Rope_base): Inherit directly from the rope allocator; use
665 rebinding instead of _Alloc_traits; pick up data member from
667 (rope::_S_new_RopeLeaf, rope::_S_new_RopeConcatenation,
668 rope::_S_new_RopeFunction, rope::_S_new_RopeSubstring): Tweak.
670 2004-01-13 Paolo Carlini <pcarlini@suse.de>
673 * include/bits/basic_string.tcc (compare(size_type, size_type,
674 const _CharT*, size_type)): Implement correctly the resolution
675 of DR 5: basically, s is a char array, -not- a C string.
676 * include/bits/basic_string.h: Tweak some comments.
677 * testsuite/21_strings/basic_string/compare/char/13650.cc: New.
678 * testsuite/21_strings/basic_string/compare/wchar_t/13650.cc: New.
680 2004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
682 * testsuite/lib/libstdc++.exp: Set LD_LIBRARY_PATH_32 for
685 2004-01-12 Paolo Carlini <pcarlini@suse.de>
687 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc:
689 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc:
692 2004-01-12 Paolo Carlini <pcarlini@suse.de>
694 * include/bits/locale_facets.h (struct __numpunct_cache):
695 Add members _M_truename_len and _M_falsename_len, caching
696 the lengths of _M_truename and _M_falsename.
697 (__numpunct_cache<>::_M_cache): Assign the latter.
698 * include/bits/locale_facets.tcc (num_get::do_get(bool&),
699 num_put::do_put(bool)): Use the new members, thus avoiding
700 computing string lengths again and again.
701 * config/locale/generic/numeric_members.cc
702 (numpunct<>::_M_initialize_numpunct): Assign the new members.
703 * config/locale/gnu/numeric_members.cc
704 (numpunct<>::_M_initialize_numpunct): Likewise.
706 2004-01-12 Mark Mitchell <mark@codesourcery.com>
708 * testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
709 * testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
711 * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
712 and remove Cygwin XFAIL.
713 * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
714 * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
715 * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
716 * testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
718 * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
719 * testsuite/27_io/objects/char/7.cc: Likewise.
720 * testsuite/27_io/objects/char/9661-1.cc: Likewise.
721 * testsuite/27_io/objects/wchar_t/7.cc: Likewise.
722 * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
724 2004-01-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
726 * include/std/std_complex.h (std::complex<>::real): Return a
727 reference. Add non-const overload.
728 (std::complex<>::real): Likewise.
729 (std::real): Likewise.
730 (std::imag): Likewise.
731 (std::operator+): Tidy.
732 (std::operator-): Likewise.
733 (std::operator*): Likewise.
734 (std::operator/): Likewise.
735 (std::operator>>): Likewise.
737 2004-01-11 Paolo Carlini <pcarlini@suse.de>
740 * include/bits/fstream.tcc (imbue): Exploit the external
741 buffer to imbue 'on the fly' a new locale and convert its
742 remainder with the new codecvt facet.
743 (underflow): Tweak slightly to deal with this special case.
744 * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: New.
745 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-2.cc: Ditto.
746 * testsuite/27_io/basic_filebuf/imbue/wchar_t/13582-3.cc: Ditto.
747 * testsuite/27_io/objects/wchar_t/13582-1_xin.cc: Ditto.
748 * testsuite/27_io/objects/wchar_t/13582-1_xin.in: Ditto.
750 2004-01-10 Paolo Carlini <pcarlini@suse.de>
752 * docs/html/ext/lwg-active.html, docs/html/ext/lwg-defects.html:
755 2004-01-10 Paolo Carlini <pcarlini@suse.de>
758 * include/bits/locale_classes.h (class locale): Fix category
760 * testsuite/22_locale/locale/13630.cc: Add.
762 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
764 * include/bits/locale_facets.h: Make a name really dependent. This
765 will be needed when Core Issue 224 is implemented.
767 2004-01-09 Paolo Carlini <pcarlini@suse.de>
769 * testsuite/performance/allocator.cc: Demangle typeid(obj).name().
770 * testsuite/performance/allocator_thread.cc: Likewise.
772 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
774 * crossconfig.m4: Add LFS, io bits to linux cross config.
775 * acconfig.h: Remove obsolete bits, reorder.
776 * config.h.in: Regenerate.
780 2004-01-07 Gawain Bolton <gp.bolton@computer.org>
782 * include/bits/stl_list.h:
783 * include/bits/list.tc:
785 Performance enhancements for destructor, push_front(),
786 push_back(), pop_front(), pop_back(), sort()
787 Eliminated static_casts where possible.
788 Moved code out of header files into new src/list.cc
789 implementation file for library where possible.
790 Remove inheritance from iterator class and create separate
791 classes for non-constant and constant iterators.
792 * include/bits/stl_tree.h (_Rb_tree class):
794 Only erase contents in destructor.
795 Eliminate unnecessary initialization in assignment operator.
796 Optimize for the nominal case by not checking whether
797 container is empty in clear().
798 Re-order test in _M_insert() to improve performance.
799 Move initialization of new node's left & right pointers to
800 src/tree.cc to where new node's colour is initialized
801 and to reduce the amount of inline code.
802 Use _M_leftmost() and _M_end() to improve readability where
804 Create separate classes for non-constant and constant
805 iterators to clarify code, avoid extra template parameters and
806 casting away constness.
808 2004-01-07 Benjamin Kosnik <bkoz@redhat.com>
810 * src/Makefile.am (sources): Add list.cc, tree.cc.
811 * src/stl_tree.cc: Move to...
812 * src/tree.cc: ...here.
814 * config/linker-map.gnu: Tweaks.
815 * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors.
816 * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors.
818 * bits/stl_vector.h: Column wrap comments.
820 2004-01-07 Loren J. Rittle <ljrittle@acm.org>
822 (re-open) PR libstdc++/12658
823 * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
824 (locale::global): Likewise.
826 2004-01-07 Paolo Carlini <pcarlini@suse.de>
828 * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
829 Remove redundant #include.
830 * testsuite/27_io/basic_ostream/endl/char/1.cc: Likewise.
831 * testsuite/27_io/basic_ostream/ends/char/1.cc: Likewise,
832 re-enable normal testing.
833 * testsuite/27_io/basic_ostream/ends/char/2.cc: Remove redundant
835 * testsuite/27_io/basic_ostream/flush/char/1.cc: Likewise.
836 * testsuite/27_io/basic_ostream/inserters_character/char/1.cc:
838 * testsuite/27_io/basic_ostream/inserters_character/char/2.cc:
840 * testsuite/27_io/basic_ostream/inserters_character/char/3.cc:
842 * testsuite/27_io/basic_ostream/inserters_character/char/4.cc:
844 * testsuite/27_io/basic_ostream/inserters_character/char/5.cc:
846 * testsuite/27_io/basic_ostream/inserters_character/char/6.cc:
848 * testsuite/27_io/basic_ostream/inserters_character/char/8.cc:
850 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/7.cc:
851 More properly, #include <locale>.
852 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc:
853 Remove redundant #include.
854 * testsuite/27_io/basic_ostream/inserters_other/char/2.cc: Likewise.
855 * testsuite/27_io/basic_ostream/inserters_other/char/3.cc: Remove
856 redundant DejaGnu directive.
857 * testsuite/27_io/basic_ostream/inserters_other/char/4.cc: Remove
860 2004-01-06 Benjamin Kosnik <bkoz@redhat.com>
861 Stefan Olsson <stefan@snon.net>
863 * scripts/check_performance: Use -pthread.
864 * testsuite/performance/allocator.cc: Tweaks, add list.
865 * testsuite/performance/allocator_thread.cc: New.
867 2004-01-06 Jerry Quinn <jlquinn@optonline.net>
869 * include/bits/locale_facets.h: Document public classes and
871 * include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
874 2004-01-06 Paolo Carlini <pcarlini@suse.de>
876 * testsuite/27_io/basic_istream/extractors_other/char/1.cc:
877 Remove redundant #includes.
878 * testsuite/27_io/basic_istream/extractors_other/char/2.cc:
880 * testsuite/27_io/basic_istream/extractors_other/char/3.cc:
882 * testsuite/27_io/basic_istream/get/char/1.cc: Likewise.
883 * testsuite/27_io/basic_istream/get/char/2.cc: Likewise.
884 * testsuite/27_io/basic_istream/getline/char/1.cc: Likewise.
885 * testsuite/27_io/basic_istream/getline/char/2.cc: Likewise.
886 * testsuite/27_io/basic_istream/getline/char/3.cc: Likewise.
887 * testsuite/27_io/basic_istream/ignore/char/1.cc: Likewise.
888 * testsuite/27_io/basic_istream/ignore/char/6360.cc: Likewise.
889 * testsuite/27_io/basic_istream/ignore/char/7220.cc: Likewise.
890 * testsuite/27_io/basic_istream/peek/char/1.cc: Likewise.
891 * testsuite/27_io/basic_istream/peek/char/6414.cc: Likewise.
892 * testsuite/27_io/basic_istream/putback/char/1.cc: Likewise.
893 * testsuite/27_io/basic_istream/read/char/1.cc: Likewise.
894 * testsuite/27_io/basic_istream/read/char/2.cc: Likewise.
895 * testsuite/27_io/basic_istream/read/char/3.cc: Likewise.
896 * testsuite/27_io/basic_istream/readsome/char/6746-1.cc:
898 * testsuite/27_io/basic_istream/readsome/char/6746-2.cc:
900 * testsuite/27_io/basic_istream/readsome/char/8258.cc:
902 * testsuite/27_io/basic_istream/seekg/char/2346-fstream.cc:
904 * testsuite/27_io/basic_istream/seekg/char/2346-sstream.cc:
906 * testsuite/27_io/basic_istream/seekg/char/8348-1.cc: Likewise.
907 * testsuite/27_io/basic_istream/seekg/char/8348-2.cc: Likewise.
908 * testsuite/27_io/basic_istream/tellg/char/8348.cc: Likewise.
910 2004-01-04 Paolo Carlini <pcarlini@suse.de>
912 * testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc:
913 Remove redundant #includes.
914 * testsuite/27_io/basic_istream/extractors_arithmetic/char/02.cc:
916 * testsuite/27_io/basic_istream/extractors_arithmetic/char/03.cc:
918 * testsuite/27_io/basic_istream/extractors_arithmetic/char/06.cc:
920 * testsuite/27_io/basic_istream/extractors_arithmetic/char/07.cc:
922 * testsuite/27_io/basic_istream/extractors_arithmetic/char/08.cc:
924 * testsuite/27_io/basic_istream/extractors_arithmetic/char/09.cc:
926 * testsuite/27_io/basic_istream/extractors_arithmetic/char/10.cc:
928 * testsuite/27_io/basic_istream/extractors_arithmetic/char/11.cc:
930 * testsuite/27_io/basic_istream/extractors_arithmetic/char/13.cc:
932 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/1.cc:
934 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc:
936 * testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc:
939 2004-01-04 Mark Mitchell <mark@codesourcery.com>
942 * testsuite/27_io/basic_filebuf/4.cc: Remove use of invalid copy
944 * testsuite/27_io/basic_fstream/4.cc: Likewise.
945 * testsuite/27_io/basic_ifstream/4.cc: Likewise.
946 * testsuite/27_io/basic_ios/4.cc: Likewise.
947 * testsuite/27_io/basic_iostream/4.cc: Likewise.
948 * testsuite/27_io/basic_istream/4.cc: Likewise.
949 * testsuite/27_io/basic_istingstream/4.cc: Likewise.
950 * testsuite/27_io/basic_ofstream/4.cc: Likewise.
951 * testsuite/27_io/basic_ostream/4.cc: Likewise.
952 * testsuite/27_io/basic_ostringstream/4.cc: Likewise.
953 * testsuite/27_io/basic_stringbuf/5.cc: Likewise.
954 * testsuite/27_io/basic_stringstream/4.cc: Likewise.
956 2004-01-04 Paolo Carlini <pcarlini@suse.de>
958 * config/locale/generic/numeric_members.cc (_M_initialize_numpunct):
959 Avoid unnecessarily zero terminating _M_atoms_out and _M_atoms_in;
960 always use double underscored names.
961 * config/locale/gnu/numeric_members.cc (_M_initialize_numpunct):
963 * include/bits/locale_facets.h (struct __numpunct_cache):
964 Dimension _M_atoms_out and _M_atoms_in one position smaller.
965 (__numpunct_cache<>::_M_cache): Don't zero terminate _M_atoms_out